Description
As far as I know, this is not:
- [BUG]
npm install -g npm
may break npm installation #555 (I don't recall trying to upgrade and breaking anything, previously; plus, npm is not installed as root: if I try the same command with sudo, I getsudo: npm: command not found
) - [BUG] when globali install v7 I can not instal v6 #2454 (I'm running npm 7.5.3, not 6.x)
- [BUG] npx behavior in CI environments #1935 (not npx, not CI, just a local Linux environment)
Current Behavior:
When I open a terminal, I get this message:
npm notice
npm notice New minor version of npm available! 7.5.3 -> 7.6.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.6.0
npm notice Run npm install -g npm@7.6.0 to update!
npm notice
When I run npm install -g npm@7.6.0
as it suggests, I get:
npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'agentkeepalive'
npm ERR! Require stack:
npm ERR! - /home/me/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/make-fetch-happen/agent.js
npm ERR! - /home/me/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/make-fetch-happen/index.js
npm ERR! - /home/me/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/npm-registry-fetch/index.js
npm ERR! - /home/me/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/pacote/lib/remote.js
npm ERR! - /home/me/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/pacote/lib/git.js
npm ERR! - /home/me/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/pacote/lib/fetcher.js
npm ERR! - /home/me/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/pacote/lib/index.js
npm ERR! - /home/me/.nvm/versions/node/v12.16.1/lib/node_modules/npm/lib/utils/update-notifier.js
npm ERR! - /home/me/.nvm/versions/node/v12.16.1/lib/node_modules/npm/lib/cli.js
npm ERR! - /home/me/.nvm/versions/node/v12.16.1/lib/node_modules/npm/bin/npm-cli.jsnpm ERR! A complete log of this run can be found in:
npm ERR! /home/me/.npm/_logs/2021-03-04T07_50_45_244Z-debug.log
Expected Behavior:
A successful upgrade to npm 7.6.0.
Steps To Reproduce:
- In Linux Mint 19.3 64-bit,
- With nvm installed and pointing to v12.16.1 as the default,
- Run
npm install -g npm@7.6.0
- See the above error