[BUG] "ERR! Cannot find module 'agentkeepalive'" trying to "npm install -g npm@7.6.0"
envgap__npm__cli-2818
01 / FAILURE SIGNATURE
Captured in a clean container
- https://github.com/npm/cli/issues/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 get `sudo: npm: command not found`)
02 / ENVIRONMENT RECIPE
- Base commit
0c881fc3e12c34fabf6225b1f5c0200d424f996c- Manifest
package.json- Reproduce
npm install --before=2021-03-04T11:48:49Z- Run under trace
node -e "const p=require('./package.json'); require(p.main||'.'); console.log(p.name)"
03 / ORIGINAL ISSUE TEXT
npm/cli #2818 · read the original issue
As far as I know, this is not: - https://github.com/npm/cli/issues/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 get `sudo: npm: command not found`) - https://github.com/npm/cli/issues/2454 (I'm running npm 7.5.3, not 6.x) - https://github.com/npm/cli/issues/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.js > > npm 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: 1. In Linux Mint 19.3 64-bit, 2. With nvm installed and pointing to v12.16.1 as the default, 3. Run `npm install -g npm@7.6.0` 4. See the above error
04 / LABELS
Labels checked by running the task · needs human review
underspecificationLabel rules and the text that matched
[]
Historical install-only results are not EnvGap validation.
Default recipe; commands are ecosystem conventions, not issue-specific.
Proposed by batch curation; baseline wall 83s
Preparation uses current registries. Historical package availability is not enforced here; execution metadata records this limitation separately from the oracle's date-bounding policy.