-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
How to update npm? #1541
Comments
You can use yarn, if you like - |
nvm install-latest-npm
|
This worked for me: https://stanko.github.io/nvm-updating-npm/ |
Those instructions are a bit silly; you can |
@ljharb I ran |
@matteplus that command needs to be run while nvm using the proper node version; in other words, it will update whichever |
@ljharb I see your point and that is exactly what I expected, but not what I found. |
That definitely seems strange. Glad you found a workaround, but the proper solution should work for the majority, ideally. |
(It follows |
I tried to downgrade and upgrade again and now it works as you described. So yes, possibly something was wrongly set and now it's fixed. Thanks for your responses |
I had this issue today. I looked into the nvm directory |
@MartinsOnuoha |
|
@vspedr for npm, opening a new terminal session is not required. |
@ljharb running |
That sounds like a different, troubling issue, and implies your |
npm proposes to remove npx and npm but then I can't run npm anymore xD Windows 10
That's why I tried to |
when npm is broken, your only recourse is to reinstall node. |
Just installed 11.7.0 but that doesn't help, the error is the same. |
You don’t; npm is updated only with npm itself. You can, though, run |
@ljharb thanks for the reply |
You might be running an old version of nvm; try reinstalling the latest. |
The only think that worked for me is to go |
@Tazzmanian on windows, you’d need WSL for this project to work; however, if |
Those using NVM for Windows will struggle to get this npm update feature. I have NVM 1.1.7 which is the latest version on Windows and |
@Seefer that’s because that’s not nvm, it’s nvm-windows, an entirely unrelated project. The latest version of nvm is v0.34.0 as of this writing. |
Thank in advance
The text was updated successfully, but these errors were encountered: