Skip to content
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

Yarn overrides linked dependencies #1718

Closed
robinvdvleuten opened this issue Nov 7, 2016 · 4 comments
Closed

Yarn overrides linked dependencies #1718

robinvdvleuten opened this issue Nov 7, 2016 · 4 comments

Comments

@robinvdvleuten
Copy link

robinvdvleuten commented Nov 7, 2016

Hi there,

I have linked a (private) dependency through the command yarn link @org/depname. Now everytime I run another yarn command (link yarn add for example), the code inside the linked directory is overridden with the published version mentioned in the lock file. I expect that yarn skips this directory.

BWT I use version 0.16.1

@wclr
Copy link
Contributor

wclr commented Nov 7, 2016

I'm too experience problems with linking. For me it is still not completely clear how linking should work not to create a big hassle for developer.

If one link package to the project one probably expects all the dependencies from linked package be available to the project where it is linked, as it would be installed normally (with yarn add/install), or not?

Currently link just makes a symlink of the linked package in project's node_modules replacing if there this package was installed normally, but leaving its dependencies (of normally installed version) in place. I wonder what it should do with the dependencies of the linked package?

Issues tag:
Btw, as linking packages is very important topic for dev process I think yarn repo should have separate tag for issues related to it.

@robinvdvleuten
Copy link
Author

Maybe I've the issue incorrectly, the issue is with the linked package itself not its dependencies;

-project1
--node_modules
---project2 (symlinked through "yarn link")

-project2
--node_modules

Now everytime I run any yarn command inside project1's directory, any code belonging to project2 will be overridden with the version as described in yarn.lock. I expect that yarn just leaves this symlinked directory alone.

I noticed it as project2 is a git repository and after running yarn in project1's directory, it changes the files belonging to project2 to an older version.

@wclr
Copy link
Contributor

wclr commented Nov 7, 2016

There is seem to be an issue for this #1214

@robinvdvleuten
Copy link
Author

Yups that's exactly the same, this can be closed.

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

No branches or pull requests

2 participants