Next.js Discord

Discord Forum

Next Js with Bun

Answered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
why bun tell us to use "bun --bun run dev" to start development environment on next js?

what's the difference between with --bun and without --bun?

is if we dont use --bun, next will start with node js?
Answered by joulev
https://bun.sh/docs/cli/run#bun

but basically yes. The next program has a hardcoded shebang for nodejs, so by default bun run respects this shebang and uses node for the runtime. The --bun option makes bun run force the bun runtime
View full answer

2 Replies