-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
"npm update" deletes npm itself #2014
Comments
We tried again to update, now with version 15.1.0, and we still have the same issue. |
this is the intended behavior. when npm attempts to turn your requested package dependencies into reality part of that process involves removing packages that are not required. you can see this in your repo if you run
above you'll note the line that tells us that you can correct this by adding npm itself to your package.json's dependencies field like a repeated run of
and running |
i still running into this issue |
We've updated our node installation from the latest 14 version to the current version 15.0.1.
After updating and executing the "npm update" command, the npm folder gets deleted.
In our environment, we've included the node standalone installation (along with npm) in our git repository. The package.json is located in the same directory as the node executable. Therefor its not the same situation as described in this issue npm/npm#5050.
I just created a repro here: https://github.com/michaelestermann/NpmUpdateRepro
Current Behavior:
When executing npm update in the described environment above. The npm folder in the node_modules directory gets deleted.
Expected Behavior:
It should ignore the npm folder.
Steps To Reproduce:
Environment:
The text was updated successfully, but these errors were encountered: