-
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 resolves package wrong #4024
Comments
In my understanding, I really think the problem is with Webpack that should use |
But I'm not even using webpack. So the dependency come from |
Ah I see @andreasonny83 you meant this line: https://github.com/webpack/webpack/blob/master/package.json#L12 isn't there an option to pin down |
In this case is there really nothing that can be done to get yarn to work? |
@BorntraegerMarc , if you're using Your package.json should mention: |
I'm not using |
although it's specified here directly: https://github.com/angular/angular-cli/blob/v1.2.4/package.json#L54 Plus the build works if you downgrade to v0.24.6. So maybe it's a yarn problem after all? |
@BorntraegerMarc can you please provide us with a minimal reproducible case so we can see if this is a yarn issue or not? A minimal case would be providing a Until then we cannot really help :( |
Sure @BYK here is the package.json:
This is the output on console:
In the yarn.lock file I see:
then the older yarn version:
And I see only this in the lock file:
|
PS: I always deleted the lock file. Just to be sure. |
@BorntraegerMarc - This seems like expected behavior to me. Your system seems to be relying on hoisting specifics instead of declaring its dependencies properly via See the discussion on #3951 please. I did some debugging and looks like |
@BYK it is expected behavior that v0.24.6 and v0.27.5 resolve dependencies totally different? |
After I upgraded my
Since I use
This did not solve the issue when using |
Yes. Yarn guarantees consistency for only the same major version of yarn with the same lock file. With the upcoming Yarn 1.0, this will be clearer hopefully since when doing
Long story short, this is expected. If you can provide more details about which package needs what other package and who relies on them being the same version, I can possibly provide a solution or may uncover a bug. Since I still don't fully understand what is the expected dependency tree and how it is defined here I cannot confidently say this is a bug or not yet. |
Alright, didn't know yarn guarantees consistency for only the same major version. This issue can be closed in that case. Sorry, I don't have the time in the moment to make any further investigations... Thx! |
@BorntraegerMarc alright then. Sorry for the inconvenience! Please come back if you have any findings that may point the arrows to yarn. My suspicion is, someone needing to list |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Check out my comment at angular/angular-cli#7113 (comment)
With the posted package.json yarn installs the wrong dependencies with version
v0.27.5
doesn't resolve dependencies properly whilev0.24.6
does.The problem is the
enhanced-resolve
dependency.If the current behavior is a bug, please provide the steps to reproduce.
Copy the package.json from Check out my comment at angular/angular-cli#7113 (comment)
it resolves to
What is the expected behavior?
It should resolve correctly.
Please mention your node.js, yarn and operating system version.
Windows 10
The text was updated successfully, but these errors were encountered: