-
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
Running yarn link unlinks any modules linked via yarn link. #4770
Comments
Right, before v1 I'm not sure if it is by design behavior. Also, want to mention |
Would be really useful for me if this one was fixed. |
**Summary** Actual fix: changed fs.readlink to fs.realpath when checking if a symlink is a linked dependency in package-linker.js This fixes yarn removing linked deps when installing or updating. Fixes #3288, fixes #4770, fixes #4635, fixes #4603. Potential fix for #3202. **Test plan** See #3288 (comment) for repro steps. See #3288 (comment) for my explanation of the problem. With a real world test scenario this works, but I'm unable to have it break from a unit test. I added a test in the integration suite but with the bug added back in it still passes because both generated paths are identical. I would like some help with the unit test.
I understand this is fixed. Thank you. How can we test? |
Clone master and build it, install using |
…#4757) **Summary** Actual fix: changed fs.readlink to fs.realpath when checking if a symlink is a linked dependency in package-linker.js This fixes yarn removing linked deps when installing or updating. Fixes yarnpkg#3288, fixes yarnpkg#4770, fixes yarnpkg#4635, fixes yarnpkg#4603. Potential fix for yarnpkg#3202. **Test plan** See yarnpkg#3288 (comment) for repro steps. See yarnpkg#3288 (comment) for my explanation of the problem. With a real world test scenario this works, but I'm unable to have it break from a unit test. I added a test in the integration suite but with the bug added back in it still passes because both generated paths are identical. I would like some help with the unit test.
Yarn version 1.2.1.
Do you want to request a feature or report a bug?
Bug.
What is the current behavior?
Running
yarn add [package-name]
unlinks any linked modules. Here is a screenshot showing this:If the current behavior is a bug, please provide the steps to reproduce.
cd app
ls -l node_modules | grep sequential
--> shows that the module is not linkedyarn link sequential-ids
ls -l node_modules | grep sequential
--> shows that the module is now linkedyarn add lodash
ls -l node_modules | grep sequential
--> shows that the module is now unlinkedWhat is the expected behavior?
yarn add [package-name]
should never cause linked packages to become unlinked.Please mention your node.js, yarn and operating system version.
Node 8.6.0.
macOS High Sierra. This also happened on Sierra.
The text was updated successfully, but these errors were encountered: