Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Workaround for yarn link bug #10

Closed
OliverUv opened this issue Mar 14, 2017 · 4 comments
Closed

Workaround for yarn link bug #10

OliverUv opened this issue Mar 14, 2017 · 4 comments

Comments

@OliverUv
Copy link
Contributor

So I looked into that test error you found in Pull #9

I reset everything locally, then added .only to the yarn test, and got the same result you did. Yarn does set up symlinks correctly, but it does not automatically run yarn install for the linked modules. Since the links would always link back to the shared_modules/* directories, the test suite would detect the lodash folder installed by the tests run with npm previously. I suppose the same thing must have happened on Travis.

Since yarn aims to mirror the functionality of npm, this must be considered a bug on their side.

Would you be interested in me implementing a workaround for it in this project? I would gate it behind a --yarn-workaround-force-install flag (since my use case scenario for this is all stuff run in CI systems, the long flag name is acceptable)

@OrKoN
Copy link
Owner

OrKoN commented Mar 14, 2017

@OliverUv would be cool if you come up with a workaround. But what I also noticed is that yarn does not detect if a dependency is linked. I.e. if you have "package-a": "*" in you package.json and package-a was linked previously with yarn link, "yarn install" will not be able to find "package-a" because it will try to resolve it from the registry. So if you have a fake dependency for linked modules and normal dependencies yarn won't probably link them properly.

@OliverUv
Copy link
Contributor Author

That seems to be described here yarnpkg/yarn#1297

I get 156 open issues with the word "link" in the yarn repo. Guessing they're a bit swamped at the moment, and that yarn link won't work very well any time soon.

I'll report this bug on their issue tracker, and won't bother using yarn until things have improved. Guess we're back to 2x build times on our CI system with slow as molasses Chinese npm mirrors :(

Want me to add a warning to the readme about the brokenness of yarn link? I think the flag should be kept as it should just start working properly once the yarn project reaches their goal of npm parity.

@OrKoN
Copy link
Owner

OrKoN commented Mar 14, 2017

@OliverUv Sounds good, thanks. And let's hope yarn will fix the linking process so that it is compatible with npm - yarn is a great tool.

@OliverUv
Copy link
Contributor Author

Closing since there isn't much more to be done than wait.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants