There's a section about Uninstall existing npm, but the recommendations for upgrading are scattered in the issues.
The relationship between node
, npm
and nvm
is not clear and it's not obvious if upgrading npm
should be done through nvm
or at least in a way that doesn't break nvm
.
This is more of a "how Node works" type of thing, but your point is well taken. I do think clarifying language around this concept would be a valuable addition.
[npm-windows-upgrade] does not work for me, but a variation of the technique mentioned in https://github.com/coreybutler/nvm-windows/issues/500#issuecomment-571619789 did work.
C:\Program Files\nodejs
in my case)npm
→ npm-old
npm.cmd
→ npm-old.cmd
npx
→ npx-old
npx.cmd
→ npx-old.cmd
npm-old install -g npm@latest
npm
, npm.cmd
, etc.)I am running Windows 10 Enterprise v1903 (build 18362.904) and nvm-windows 1.1.7
Edit: This is similar (but not quite equal to) of the techniques discovered by @rsshilli on StackOverflow, which was improved upon in https://github.com/coreybutler/nvm-windows/issues/300#issuecomment-488422378 and https://github.com/coreybutler/nvm-windows/issues/300#issuecomment-509576885. We keep reinventing the wheel in slightly different ways.
Most helpful comment
This is more of a "how Node works" type of thing, but your point is well taken. I do think clarifying language around this concept would be a valuable addition.