Regression in NodeJS 22.22.2 causing NPM installation failure.
The issue involves a regression in NodeJS 22.22.2 where installing the latest NPM fails due to a missing module 'promise-retry'. The problem is reproducible across different platforms and versions, suggesting a dependency or packaging issue. The scope is somewhat clear but requires investigation into the NPM installation process and dependencies.
v22.22.2
Darwin M-FC6WJYY430 25.3.0 Darwin Kernel Version 25.3.0: Wed Jan 28 20:56:35 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T6030 arm64
No response
# use the latest node 22.x
nvm install 22.22.2
# activate the node version
nvm use 22.22.2
# install latest npm
npm install -g npm@latest
Always happens.
NPM should install successfully.
npm error code MODULE_NOT_FOUND
npm error Cannot find module 'promise-retry'
npm error Require stack:
npm error - /opt/hostedtoolcache/node/22.22.2/x64/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js
npm error - /opt/hostedtoolcache/node/22.22.2/x64/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/index.js
npm error - /opt/hostedtoolcache/node/22.22.2/x64/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/index.js
npm error - /opt/hostedtoolcache/node/22.22.2/x64/lib/node_modules/npm/node_modules/libnpmfund/lib/index.js
npm error - /opt/hostedtoolcache/node/22.22.2/x64/lib/node_modules/npm/lib/utils/reify-output.js
npm error - /opt/hostedtoolcache/node/22.22.2/x64/lib/node_modules/npm/lib/utils/reify-finish.js
npm error - /opt/hostedtoolcache/node/22.22.2/x64/lib/node_modules/npm/lib/commands/install.js
npm error - /opt/hostedtoolcache/node/22.22.2/x64/lib/node_modules/npm/lib/npm.js
npm error - /opt/hostedtoolcache/node/22.22.2/x64/lib/node_modules/npm/lib/cli/entry.js
npm error - /opt/hostedtoolcache/node/22.22.2/x64/lib/node_modules/npm/lib/cli.js
npm error - /opt/hostedtoolcache/node/22.22.2/x64/lib/node_modules/npm/bin/npm-cli.js
Created a minimal reproducible matrix of Node and NPM versions in https://github.com/altbdoor/node-22-npm-regress/actions/runs/23525843427/j
Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!