This project shows a sample to reproduce yarn workspace .bin path resolving bug
- Reproducable yarn version: 1.22.4
- Install workspace with yarn
Symlinks
- packages/workspace-1/node_modules/.bin/myBin -> ../../../../node_modules/my_project_with_bin/cli_v1.js
- packages/workspace-2/node_modules/.bin/myBin -> ../my_project_with_bin/cli_v2.js
- In
workspace-1
(depends onmy_project_with_bin/v1
)
When you run yarn bin myBin
➜ /repos/yarn-workspace-bin-bug/node_modules/.bin/myBin
- In
workspace-2
(typescriptmy_project_with_bin/v2
)
When you run yarn bin myBin
➜ /repos/yarn-workspace-bin-bug/node_modules/.bin/myBin
yarn bin myBin
should indicate individual .bin folder for the project respectively.