Skip to content

[BUG] npm self-upgrade to 11.16.0 fails with Cannot find module 'promise-retry' #9526

Closed as duplicate

Description

@rlapointe

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

This is not just a request to bump a dependency for a CVE

  • This is not solely a request to bump a dependency for a CVE

Current Behavior

npm version

10.9.7 trying to upgrade to 11.16.0

node version

v22.22.2

Platform

macOS / Darwin 25.3.0, darwin-arm64, installed via nvm

Reproduction

From home directory, outside any project repo:

nvm install 22.22.2
nvm use 22.22.2
node --version
npm --version
npm view npm@11.16.0 dist.integrity
npm install -g npm@11.16.0 --ignore-scripts

### Expected Behavior

npm upgrades globally to 11.16.0.

### Steps To Reproduce

1. In this environment:
   macOS / Darwin 25.3.0
   darwin-arm64
   Node installed via nvm
   node v22.22.2
   npm v10.9.7

2. With this config:

Command was run from the home directory, not inside a project repo:
/Users/username

npm package integrity checked before install:
sha512-A74XL8OxmcegZDMWPkWb5bEQppg8HdYwW3rBD2sPoS4UQHVajfaxBkqyzLeJ3wR0kZ+5xoTjItxXaF7eIXUsyw==

3. Run:

cd ~
nvm install 22.22.2
nvm use 22.22.2
npm view npm@11.16.0 dist.integrity
npm install -g npm@11.16.0 --ignore-scripts

4. See error:
npm error code MODULE_NOT_FOUND
npm error Cannot find module 'promise-retry'
npm error Require stack:
npm error - /Users/username/.nvm/versions/node/v22.22.2/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js
npm error - /Users/username/.nvm/versions/node/v22.22.2/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/index.js
npm error - /Users/username/.nvm/versions/node/v22.22.2/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/index.js

### Environment

node bin location = /Users/username/.nvm/versions/node/v22.22.2/bin/node
; node version = v22.22.2
; npm local prefix = /Users/username
; npm version = 10.9.7
; cwd = /Users/username
; HOME = /Users/username

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions