Giter Club home page Giter Club logo

Comments (2)

tmtron avatar tmtron commented on May 26, 2024

I had the same issue. I guess this tool does not work (or is not even required) when you use NVM

See the npm remarks [here](see https://github.com/nvm-sh/nvm#migrating-global-packages-while-installing) and check the --latest-npm flag.

If my guess is true, it would be great, if the maintainers could add a little hint section regarding NVM to the readme file.

from npm-windows-upgrade.

jmenashe avatar jmenashe commented on May 26, 2024

I was having issues upgrading npm from version 6.x to version 7.6.3 and the CLI output was of no help. I googled an error message similar to OP's and found this comment from a closed issue. I then followed the instructions:

Uninstall nodejs, not repair!, UNINSTALL.
Go into %programfiles%\nodejs and delete the entire folder.
Delete %appdata%\npm and %appdata%\npm-cache
Edit your PATH and remove everything that references npm (either program files or appdata).

At this point you should have a blank slate. No node packages, no node in your path, nothing.

So then install the latest node from nodejs.org.

I ran the Node 15.2 installer, and this correctly upgraded npm to 7.6.3.

I'm not sure if this was the "correct" procedure, but it's the first thing that worked after 20 minutes of searching. Whatever the workaround should be, I would suggest that it be included in the CLI error message.

from npm-windows-upgrade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.