-
Notifications
You must be signed in to change notification settings - Fork 601
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
[rush] "rush update" fails if npm-shrinkwrap.json is present (sometimes) #1706
Comments
Hmmm, interesting: I started over from scratch, with |
@trusktr Closing this since it doesn't seem to not be an issue anymore. Feel free to reopen if the issue shows up again. |
deletedI updated the other project that isn't working to rush 5.18, but still errors, so that's not it. I diffed the two folders, and these are the differences I noticed:
That's literally it! There are no other differences, yet one project fails with those errors! EDIT: I cleaned up the repos, deleted all ignored files (temp folders, node_modules folders, etc), and the difference between both project is very minimal. In the following screenshot, the directory structure on the left if the repo that doesn't work, and the one on the right is the one that works: As you can see, not much significant difference. You see dangling symlinks on the left, npm-shrinkwrap files differ, some prettier config files in the broken repo, and package-lock files at the root differ. Really nothing obvious here! |
@apostolisms I can not figure out why one repo is borked but the other is not. Let me try removing those differences from above to find the culprit, and then maybe this will be actionable. |
Alright! I reduced the diff to literally just npm-shrinkwrap.json, After removing this file in the broken repo, it all started working! So there's some sort of problem with how I've made two branches, in which the only difference is in
(make sure to @apostolisms I hope that helps. Do you want to re-open this now that I have made the most minimal reproduction? I edited the OP to include the reproduction as well. For anyone stumbling here, the workaround is to simply remove |
@trusktr Thanks for the repro. I will reopen to investigate. |
I found a way to go from a good state to the bad state: in a working repo, I ran I'm not sure what the preconditions should be so that running What we can try is:
I'm not sure if this depends on npmjs.com packages having been updated since the last shrink wrap. Possibly if there are no updates to any packages, then there won't be any SHA changes. |
Why are the SHAs different? Where does it get the "Wanted" and "Found" values from? |
What version of NPM are you using? If I remember right newer versions aren't supported very well due to lack if interest from the community. |
See here for some background: #886 |
Ah, I'm on NPM 6.13.6 |
I am getting this error with yarn when |
Just want to let you know that this error still occurs, but thanks for the workaround, OP |
For anyone stumbling here, the workaround is to simply remove
common/config/rush/npm-shrinkwrap.json
, then runrush update
, if you're usingnpm
instead ofpnpm
oryarn
.Is this a feature or a bug?
npm install
in each project just fine, justrush install
is not working.Please describe the actual behavior.
Both
rush install
andrush update
fail with errors likeWhat is the expected behavior?
No errors.
Reproduction
I've made two branches, in which the only difference is in
common/config/rush/npm-shrinkwrap.json
; one works, the other doesn't:If this is a bug, please provide the tool version, Node.js version, and OS.
The text was updated successfully, but these errors were encountered: