Skip to main content
added 276 characters in body
Source Link
rozsazoltan
  • 18.2k
  • 8
  • 49
  • 145

Bun creates symlinks for the npm and npx commands (by specific PATH value), so when you try to access them globally, you end up invoking Bun's symlinks, and Bun is launched.

which npm
which npx

When editing the PATH key in the list of environment variables, move the Node.js and npm paths above bun. This way, when you type the npm or npx commands, Windows will stop at the first match in the PATH and execute it, meaning the original npm and npx will run.

Alternative

Uninstall Node.js (or nvm) and Bun from your system. Then install the mise version manager. After that, use mise to install the required versions of Node.js and Bun. You can customize these per project, or set global default versions.

winget install jdx.mise

mise use -g node@22
mise use -g bun@latest

Note: Avoid using bun upgrade to upgrade bun as mise will not be aware of the change.

mise upgrade

For a major version upgrade, of course, you'll need to install it manually again. But if you use the latest keyword, mise will take care of that automatically.

mise use -g node@24
mise use -g bun@latest

Bun creates symlinks for the npm and npx commands (by specific PATH value), so when you try to access them globally, you end up invoking Bun's symlinks, and Bun is launched.

which npm
which npx

When editing the PATH key in the list of environment variables, move the Node.js and npm paths above bun. This way, when you type the npm or npx commands, Windows will stop at the first match in the PATH and execute it, meaning the original npm and npx will run.

Alternative

Uninstall Node.js (or nvm) and Bun from your system. Then install the mise version manager. After that, use mise to install the required versions of Node.js and Bun. You can customize these per project, or set global default versions.

winget install jdx.mise

mise use -g node@22
mise use -g bun@latest

Bun creates symlinks for the npm and npx commands (by specific PATH value), so when you try to access them globally, you end up invoking Bun's symlinks, and Bun is launched.

which npm
which npx

When editing the PATH key in the list of environment variables, move the Node.js and npm paths above bun. This way, when you type the npm or npx commands, Windows will stop at the first match in the PATH and execute it, meaning the original npm and npx will run.

Alternative

Uninstall Node.js (or nvm) and Bun from your system. Then install the mise version manager. After that, use mise to install the required versions of Node.js and Bun. You can customize these per project, or set global default versions.

winget install jdx.mise

mise use -g node@22
mise use -g bun@latest

Note: Avoid using bun upgrade to upgrade bun as mise will not be aware of the change.

mise upgrade

For a major version upgrade, of course, you'll need to install it manually again. But if you use the latest keyword, mise will take care of that automatically.

mise use -g node@24
mise use -g bun@latest
added 276 characters in body
Source Link
rozsazoltan
  • 18.2k
  • 8
  • 49
  • 145

Bun creates symlinks for the npm and npx commands (by specific PATH value), so when you try to access them globally, you end up invoking Bun's symlinks, and Bun is launched.

which npm
which npx

When editing the PATH key in the list of environment variables, move the Node.js and npm paths above bun. This way, when you type the npm or npx commands, Windows will stop at the first match in the PATH and execute it, meaning the original npm and npx will run.

Alternative

Uninstall Node.js (or nvm) and Bun from your system. Then install the mise version manager. After that, use mise to install the required versions of Node.js and Bun. You can customize these per project, or set global default versions.

winget install jdx.mise

mise use -g node@22
mise use -g bun@latest

Bun creates symlinks for the npm and npx commands (by specific PATH value), so when you try to access them globally, you end up invoking Bun's symlinks, and Bun is launched.

which npm
which npx

Bun creates symlinks for the npm and npx commands (by specific PATH value), so when you try to access them globally, you end up invoking Bun's symlinks, and Bun is launched.

which npm
which npx

When editing the PATH key in the list of environment variables, move the Node.js and npm paths above bun. This way, when you type the npm or npx commands, Windows will stop at the first match in the PATH and execute it, meaning the original npm and npx will run.

Alternative

Uninstall Node.js (or nvm) and Bun from your system. Then install the mise version manager. After that, use mise to install the required versions of Node.js and Bun. You can customize these per project, or set global default versions.

winget install jdx.mise

mise use -g node@22
mise use -g bun@latest
added 22 characters in body
Source Link
rozsazoltan
  • 18.2k
  • 8
  • 49
  • 145

Bun creates symlinks for the npm and npx commands (by specific PATH value), so when you try to access them globally, you end up invoking Bun's symlinks, and Bun is launched.

which npm
which npx

After removing the symlinks, reconfigure Node.js.

Bun creates symlinks for the npm and npx commands, so when you try to access them globally, you end up invoking Bun's symlinks, and Bun is launched.

which npm
which npx

After removing the symlinks, reconfigure Node.js.

Bun creates symlinks for the npm and npx commands (by specific PATH value), so when you try to access them globally, you end up invoking Bun's symlinks, and Bun is launched.

which npm
which npx
added 22 characters in body
Source Link
rozsazoltan
  • 18.2k
  • 8
  • 49
  • 145
Loading
deleted 20 characters in body
Source Link
rozsazoltan
  • 18.2k
  • 8
  • 49
  • 145
Loading
Source Link
rozsazoltan
  • 18.2k
  • 8
  • 49
  • 145
Loading