Created
May 17, 2019 09:37
-
-
Save rbinsztock/a0ba42da0be9b865a32c793d2e5b2729 to your computer and use it in GitHub Desktop.
Update NPM with NVM Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think this is more of a previous npm version bug than nvm one. | |
However, to update npm delete in nvm/[node version] folder (for me it is v10.15.3) following files: | |
C:\Users\[user name]\AppData\Roaming\nvm\[node version]\npm | |
C:\Users\[user name]\AppData\Roaming\nvm\[node version]\npm.cmd | |
C:\Users\[user name]\AppData\Roaming\nvm\[node version]\npx | |
C:\Users\[user name]\AppData\Roaming\nvm\[node version]\npx.cmd | |
Rename npm folder to npm2 | |
C:\Users\[user name]\AppData\Roaming\nvm\[node version]\node_modules\npm2 | |
Open any console with admin rights (or even right mouse click on vscode shortcut, than right mouse click on Visual Studio Code and hit Run as administrator) and type commands: | |
cd C:\Users\[user name]\AppData\Roaming\nvm\[node version]\node_modules\npm2\bin | |
node npm-cli.js i -g npm@latest | |
Done. | |
Delete C:\Users\[user name]\AppData\Roaming\nvm\[node version]\node_modules\npm2 folder. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment