Next.js Discord

Discord Forum

bun: command not found: next

Unanswered
aksil posted this in #help-forum
Open in Discord
Hello, I have a problem with Bun. When I try to run the command bun run dev, an error appears, while it works perfectly with npm run dev. I’ve tried changing my Bun version, but it still doesn’t work, and my package.json does include "dev": "next dev". Has anyone else encountered this issue?

12 Replies

Orangetailed potter wasp
show package.json
@Orangetailed potter wasp show `package.json`
@Orangetailed potter wasp show `package.json`
here is my package.json, the script "dev": "next dev", is well registered so I don't understand where the error comes from
Orangetailed potter wasp
does npm run dev work?
yes it work
Orangetailed potter wasp
hmm, strange
you can try bun update and see if that helps
also are you on latest version of bun?
I tried with different versions of bun, including the most recent one and each time the same error appears
Orangetailed potter wasp
pretty weird however the bun has a lot of bugs, and some stuff might basically not work. my app cannot use bun for some reason because images crash the whole app, i have no idea what to do honestly
ah ok, no problem, thanks anyway for trying to help me