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

Failed to update NPM 5.3 to 5.4 #116

Open
muj-beg opened this issue Aug 30, 2017 · 5 comments
Open

Failed to update NPM 5.3 to 5.4 #116

muj-beg opened this issue Aug 30, 2017 · 5 comments

Comments

@muj-beg
Copy link

muj-beg commented Aug 30, 2017

Updated to Node 8 using NVM. (This also installed NPM 5.3.) Then attempted to update NPM to 5.4 using npm-windows-upgrade. This fails with the following message:

You wanted to install npm 5.4.0, but the installed version is 5.3.0.

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 http://aka.ms/fix-npm-upgrade.
Please consider reporting your trouble to http://aka.ms/npm-issues.

Debug Information:

http_parser: 2.7.0node: 8.4.0v8: 6.0.286.52uv: 1.13.1zlib: 1.2.11ares: 1.10.1-DEVmodules: 57nghttp2: 1.22.0openssl: 1.0.2licu: 59.1unicode: 9.0cldr: 31.0.1tz: 2017bos: win32 x64OS Name: Microsoft Windows 7 Enterprise
OS Version: 6.1.7601 Service Pack 1 Build 7601```
@Empereol
Copy link

I am also receiving the same error...

PS C:\WINDOWS\system32> npm-windows-upgrade --npm-version latest
npm-windows-upgrade v4.0.1
Checked system for npm installation:
According to PowerShell: C:\Program Files\nodejs
According to npm:        C:\Program Files\nodejs
Decided that npm is installed in C:\Program Files\nodejs
Upgrading npm... |

Upgrading npm (fallback method)... |

You wanted to install npm 5.4.2, but the installed version is 5.3.0.

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 http://aka.ms/fix-npm-upgrade.
Please consider reporting your trouble to http://aka.ms/npm-issues.

Debug Information:

http_parser: 2.7.0node: 8.2.1v8: 5.8.283.41uv: 1.13.1zlib: 1.2.11ares: 1.10.1-DEVmodules: 57openssl: 1.0.2licu: 59.1unicode: 9.0cldr: 31.0.1tz: 2017bos: win32 x64OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.15063 N/A Build 15063

@nwrbs
Copy link

nwrbs commented Oct 3, 2017

I'm having a similar issue on Centos 7.4.1708:
Run:
npm install npm@latest -g

It shows the following message:

But, when I run npm -v I get:
5.3.0

It never updates... Am I missing something or did do something incorrectly?

@felixrieseberg
Copy link
Owner

I'm wondering if this is just an issue with npm 🤔 I tried to reproduce the issue on my machine, but couldn't find any trouble - updates worked just fine. Would one of you mind running the script again, but with the environment variable DEBUG="npm-windows-upgrade" set?

You can do so in PowerShell by running this command right before running npm-windows-upgrade:

$env:DEBUG="npm-windows-upgrade"

@ZeVS777
Copy link

ZeVS777 commented Mar 18, 2018

I think the same problem is here with more information #124

@amerikiwian
Copy link

amerikiwian commented May 17, 2018

FYI: Debug log
`PS C:\WINDOWS\system32> $env:DEBUG="npm-windows-upgrade"
PS C:\WINDOWS\system32> npm-windows-upgrade
npm-windows-upgrade v4.1.0
npm-windows-upgrade Powershell: Attempting to spawn PowerShell child +0ms
npm-windows-upgrade PowerShell: Stdout received: Unrestricted
npm-windows-upgrade +204ms
npm-windows-upgrade PowerShell: Resolving unrestricted (true) +19ms
? Which version do you want to install? 6.0.0
npm-windows-upgrade PowerShell: Stdout received: C:\ProgramData\chocolatey\bin\npm.exe
npm-windows-upgrade +5s
npm-windows-upgrade PowerShell: _getPathFromNpm() resolving with: C:\Program Files\nodejs +45ms
npm-windows-upgrade Utils: isPathAccessible(): node_modules\npm does not exist +1ms
npm-windows-upgrade Utils: isPathAccessible(): C:\Program Files\nodejs\node_modules\npm exists +0ms
Checked system for npm installation:
According to PowerShell:
According to npm: C:\Program Files\nodejs
Decided that npm is installed in C:\Program Files\nodejs
npm-windows-upgrade Upgrader: Chosen npm path: C:\Program Files\nodejs +0ms
npm-windows-upgrade Starting upgrade +1ms
Upgrading npm... | npm-windows-upgrade PowerShell: Stdout received: Assuming npm in C:\Program Files\nodejs\node_modules\npm
npm-windows-upgrade +270ms
Upgrading npm... \ npm-windows-upgrade PowerShell: Stderr received: npm +202ms
npm-windows-upgrade PowerShell: Stderr received: WARN invalid config loglevel="win"
npm-windows-upgrade +0ms
Upgrading npm... - npm-windows-upgrade PowerShell: Stdout received: C:\Program Files\nodejs\npm -> C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
npm-windows-upgrade +24s
npm-windows-upgrade PowerShell: Stdout received: C:\Program Files\nodejs\npx -> C:\Program Files\nodejs\node_modules\npm\bin\npx-cli.js
npm-windows-upgrade +1ms
Upgrading npm... - npm-windows-upgrade PowerShell: Stdout received: + [email protected]
npm-windows-upgrade updated 1 package in 24.262s
npm-windows-upgrade +1s
npm-windows-upgrade PowerShell: Stdout received:
npm-windows-upgrade C:\Program Files\nodejs>"C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" install [email protected] --loglevel win
npm-windows-upgrade +30ms
Upgrading npm... - npm-windows-upgrade PowerShell: Stdout received:
npm-windows-upgrade C:\Program Files\nodejs> +6s
npm-windows-upgrade PowerShell: Stdout received: All done!
npm-windows-upgrade +4ms

Upgrading npm (fallback method)... -

You wanted to install npm 6.0.0, but the installed version is 1.4.9.

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 http://aka.ms/fix-npm-upgrade.

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

Debug Information:

http_parser: 2.8.0 | node: 10.1.0 | v8: 6.6.346.27-node.6 | uv: 1.20.2 | zlib: 1.2.11 | ares: 1.14.0 | modules: 64 | nghttp2: 1.29.0 | napi: 3 | openssl: 1.1.0h | icu: 61.1 | unicode: 10.0 | cldr: 33.0 | tz: 2018c | os: win32 x64 | OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.17134 N/A Build 17134`

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

No branches or pull requests

6 participants