-
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 doesn't install the latest versions of transitive dependencies #2364
Comments
shouldn't |
Think I had this issue show up today: I ran Before
After
|
I just had the same issue today when upgrading jest from ^18.0.0 to ^19.0.0, which depends on jest-cli ^18.0.0 that was also switched to ^19.0.0. |
Is there any way to get Yarn to upgrade a transitive dependency? I'm using ember-d3, which specifies d3 How would I get Yarn to respect the package.json specification for ember-d3 and allow me to use a newer version of d3 if I choose? |
This has actually saved me a couple of times in the past weeks. Some libraries had introduced breaking changes in minor or patch versions which broke the build when installed with This bug, when fixed, should probably be added as an optional feature-- an option to install exact versions of transitive dependencies (even without yarn.lock) |
@bgentry I've gotten in the habit of removing and re-adding the root dependency(/ies) to force an upgrade of the transitives, so in your case Ultimately the control given by a change like this proposal would be fantastic and make this all a lot easier. |
@dfreeman heh, apparently that's all I needed to do :) But yeah, there should definitely be a way to do this without having to re-add the dependency! Tracking yarnpkg/rfcs#54 now And I agree w/ @laggingreflex that it's essential to be able to specify an exact version of a transitive dependency if desired. Following #2981 as well. |
I'll close the issue for now as I don't see how we can act on it. |
I believe I'm able to reproduce the original issue with $ yarn add live-set
yarn add v1.3.2
[1/5] 🔍 Validating package.json...
[2/5] 🔍 Resolving packages...
[3/5] 🚚 Fetching packages...
[4/5] 🔗 Linking dependencies...
[5/5] 📃 Building fresh packages...
success Saved lockfile.
success Saved 10 new dependencies.
├─ asap@2.0.6
├─ babel-runtime@6.26.0
├─ core-js@2.5.1
├─ envify@4.1.0
├─ esprima@4.0.0
├─ live-set@0.4.2
├─ regenerator-runtime@0.11.0
├─ symbol-observable@1.0.4
├─ through@2.3.8
└─ zen-observable@0.5.2
✨ Done in 1.31s. EDIT: Incorrect report; I mistakenly conceived of the |
Hello, hope everyone in this thread has been having a nice life in the last 7 years. Anyway, as the poster above said, you may be running into npm/node-semver#79 |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
There's a package
start-babel-cli
that uses{"start-simple-cli": "^4.0.0"}
start-simple-cli
has been updated to4.1.0
Installing
start-babel-cli
currently installsstart-simple-cli
v4.0.0
What is the expected behavior?
Installing
start-babel-cli
should installstart-simple-cli
v4.1.0
as that's the latest version and respecting the semver as a valid minor bump, this version should be the one that's installed (right?).I've made sure to clean all cache before testing this.
npm
behaves exactly like this (i.e. it correctly installsstart-simple-cli
v4.1.0
)If the current behavior is a bug, please provide the steps to reproduce.
yarn add start-babel-cli
start-simple-cli
start-simple-cli
's versionPlease mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: