Skip to content

[BUG] "ERR! Cannot find module 'agentkeepalive'" trying to "npm install -g npm@7.6.0" #2818

Description

@codingthat

As far as I know, this is not:

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingPriority 1high priority issueRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions