Skip to content
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

README lacks information about upgrading npm #522

Closed
jakobrosenberg opened this issue Mar 22, 2020 · 3 comments
Closed

README lacks information about upgrading npm #522

jakobrosenberg opened this issue Mar 22, 2020 · 3 comments
Assignees

Comments

@jakobrosenberg
Copy link

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.

@coreybutler coreybutler self-assigned this Apr 2, 2020
@coreybutler
Copy link
Owner

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.

@pastelmind
Copy link

pastelmind commented Aug 4, 2020

npm-windows-upgrade does not work for me, but a variation of the technique mentioned in #500 (comment) did work.

  1. Go to Node.js install directory (C:\Program Files\nodejs in my case)
  2. Rename the following files:
    • npmnpm-old
    • npm.cmdnpm-old.cmd
    • npxnpx-old
    • npx.cmdnpx-old.cmd
  3. Run npm-old install -g npm@latest
  4. Delete the files I renamed in step 2. (Step 3 should have created new files named 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 #300 (comment) and #300 (comment). We keep reinventing the wheel in slightly different ways.

@coreybutler
Copy link
Owner

This is documented in the wiki at https://github.com/coreybutler/nvm-windows/wiki/Common-Issues#upgrading-npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants