-
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
yarn install fails for unpublished and linked-in dependency #2611
Comments
+1 same here |
I have to add my voice to this one. Tested with yarn 0.18.1 and node 5.10.1. The output from
|
I have this problem, too, and it's a killer. I means that before I can start development work on a new package linked in via |
As reported in #1214 (comment) I'm getting this issue on version 0.24.5. error Couldn't find package "package-name" on the "npm" registry cd path/to/a-dev-package |
Same problem with 0.27.5. The only workaround was to not list my linked package among the I'd rather not look into para-package-management workarounds like yalc. |
I'm not sure this is a bug - even if you're using |
I'm going to remove this one from the 1.0 milestone - it's not a bug strictly speaking, so we will want to think about this more in depth before changing the behavior. I agree it could be clearer. |
@aracarie It makes a lot of sense to connect the latest version of a local linked module, and removes the need to lock a specific version in the |
From a user point of view this still looks like a high(er) priority issue because it prevents people from using |
After thinking about it a bit more I agree with @arcanis. Are we missing anything? |
@bestander Are you referring to |
@nadav-dav, you can actually do this in package.json
It will create a symlink automatically. |
Cool:) I didn't know that! Well it is a step in the right direction, but still means that deploying / publishing the module will not be possible.. Actually it only helps if you experiment for local development. |
Another alternative is to use workspaces yarnpkg/website#580 if you can structure them in one folder tree. |
If you're not in the case of the local development, it means your package has to be available by some way, right? Maybe not even on the npm registry, but at least as a github repository or something. In such a case, you can use |
@bestander thanks so much for posting the example
it actually solved my issue. I tried to use unpublished local package which in its turn uses few unpublished local deps as well.
When I run But as soon as I added link prefix
|
That's not only a |
I encountered this today. Only way around it is to upload an initial module to the NPM repo and then yarn would continue (using my linked version instead). |
The "link:" workaround saved me after hours trying to figure out what was happening. I am impressed that this bug is known for almost a year and a half and it is still there. |
@snajjar suggested a fix more than 1.5 years ago and nothing has happened here. To me this makes sense and would solve the issue. If we get consensus on this I'm sure we can find someone to implement it (I'll gladly give it a shot).
In the meantime, the most simple workaround seems to be to just publish an empty package with the same name. |
I am going to close this issue in favor of existing solutions like workspaces and |
Oh, and selective resolutions may also help: https://yarnpkg.com/en/docs/selective-version-resolutions |
Most fundamentally, the thing that worked for me was: never use |
There was one case where This soon won't be the case anymore, as the v2 introduces the |
Thanks for the replies. Sounds like good solutions are being worked on! Nested workspaces would indeed solve my issue. Looking forward to that! |
Hello from 2020. Ran into this problem today and cannot understand why this is not considered an issue. |
Still an issue, |
Same issue as well, also the |
Using Into the parent project run: |
Fixed in v2 |
Just want this issue to be fixed in v1 |
2022 and still not fixed on v1? |
Hello from 2023. 👋 |
Hello from 2024 😡 |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Given I have a module listed in
dependencies
/devDependencies
that is not yet published and is linked-in to my module, yarn install fails.If the current behavior is a bug, please provide the steps to reproduce.
https://github.com/viliusl/yarn-link-issue
What is the expected behavior?
For yarn to not fail during install when yet-unpublished dependency is linked-in.
Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: