bun icon indicating copy to clipboard operation
bun copied to clipboard

`bun link` no longer works with version `1.1.5` for packages already installed in `node_modules`

Open mangs opened this issue 10 months ago • 1 comments

What version of Bun is running?

1.1.5+b257a3097

What platform is your computer?

Darwin 23.4.0 arm64 arm

What steps can reproduce the bug?

  1. Link a local package with bun link
  2. Navigate to another application that consumes that package
  3. Install that package from NPM: bun install <package>
  4. Link the package with the package already in node_modules: bun link <package>
  5. Get an error message: error: PathAlreadyExists installing @mangs/bun-utils (linking dependency/workspace to node_modules)

What is the expected behavior?

The package links correctly. This workflow has served me well for many previous Bun versions including 1.1.4.

What do you see instead?

An error message:

error: PathAlreadyExists installing @mangs/bun-utils (linking dependency/workspace to node_modules)

Additional information

If I manually delete the package from node_modules with rm -rf node_modules/package before running bun link <package>, the command completes successfully.

mangs avatar Apr 26 '24 18:04 mangs