Skip to content

bun = true config is not working as expected. Node runtime is still being used if --bun flag is not added #18975

@aabuhijleh

Description

@aabuhijleh

What version of Bun is running?

1.2.9

What platform is your computer?

Darwin 24.3.0 arm64 arm

What steps can reproduce the bug?

  • Have an old node version installed on your machine e.g. v14.17.0 using nvm
  • Create a vite react app using bun create vite
  • Create bunfig.toml and add run.bun config
  • Run it using bun dev

What is the expected behavior?

My goal is to make bun the default runtime without having to keep adding --bun flag

I want to avoid doing this

bun --bun run dev  

After adding the configuration, the dev script should run using the bun runtime without errors without having to add the --bun flag

What do you see instead?

bun runtime is not used no matter what I do if I do not use the --bun flag. Node runtime is used which leads to errors ❌

Image

Additional information

From the bun docs I can see this,

Image

but running this command gives me this error ❌

❯ bun --bun which node
error: Script not found "which"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions