Skip to content
This repository has been archived by the owner on Sep 11, 2021. It is now read-only.

Failed to upgrade from 6.14.6 to 6.14.8 #161

Open
arfaWong opened this issue Aug 20, 2020 · 2 comments
Open

Failed to upgrade from 6.14.6 to 6.14.8 #161

arfaWong opened this issue Aug 20, 2020 · 2 comments

Comments

@arfaWong
Copy link

npm-windows-upgrade v6.0.1
? Which version do you want to install? 6.14.8
Given path G:\Environment\nvm\v12.18.3 is a valid directory.
Upgrading npm... \

Upgrading npm (fallback method)... -

You wanted to install npm 6.14.8, but the installed version is 6.14.6.

A common reason is an attempted "npm install npm" or "npm upgrade npm". As of today, the only solution is to completely uninstall and then reinstall Node.js. For a small tutorial, please see https://github.com/felixrieseberg/npm-windows-upgrade#usage.

Please consider reporting your trouble to https://aka.ms/npm-issues.

Debug Information:

node: 12.18.3 | v8: 7.8.279.23-node.39 | uv: 1.38.0 | zlib: 1.2.11 | brotli: 1.0.7 | ares: 1.16.0 | modules: 72 | nghttp2: 1.41.0 | napi: 6 | llhttp: 2.0.4 | http_parser: 2.9.3 | openssl: 1.1.1g | cldr: 37.0 | icu: 67.1 | tz: 2019c | unicode: 13.0 | os: win32 x64
@tmtron
Copy link

tmtron commented Nov 26, 2020

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.

@jmenashe
Copy link

jmenashe commented Mar 25, 2021

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.

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

No branches or pull requests

3 participants