-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Root binaries get removed after installing a Workspace dependency #4706
Comments
Also encountering this. Running |
Hmm. It doesn't for me. I have to remove |
Same here. @skidding Try runnin |
Thanks. I remember trying this to not avail. What works for me:
Hope somebody finds the root cause for this though 🙏 |
The log output for the
Looking at the Git log shows #4630 made some changes to the extraneous file removal code: @arcanis I don't suppose you might know what's happening in this case? :-) |
I wonder if this is related to:
(From #4513) In this case, the workspace package has zero dependencies, so if it was overwriting the root There's also #4359 about issues with binary linking. |
I wonder if the root cause is that the bin links are being incorrectly determined after extraneous files are being removed (i.e., starting here: https://github.com/arcanis/yarn/blob/8ba49660fd96c4155af29e784a4891e2c263ce03/src/package-linker.js#L393). Removing the bin links shouldn't be a problem as long as they are re-created properly, which isn't happening. |
@jgoz you are on the right path. |
**Summary** Fixes yarnpkg#4706, fixes yarnpkg#4359, refs yarnpkg#4513. `this.config.cwd` was being used as the root for bin link paths, rather than `this.config.lockfileFolder`. **Test plan** - Added tests for `add` and `remove` commands (yarnpkg#4706) - Added test for `install` command (yarnpkg#4359)
Reproducing on Yarn 1.20 and 1.21.
Minimal reproducible demo at skidding/yarn-bin-missing
Steps to reproduce:
Step 1: Jest is installed in workspace root and binary is present after running
yarn
Step 2: Go to
foo
workspace and install LodashStep 3: Go to back to root and 💨
node_modules/.bin
is gone.The text was updated successfully, but these errors were encountered: