Commit 350bc4d
authored
chore: work around Node.js 22 / npm issue
This patch temporarily adds an extra `npm install -g npm` to ensure an incremental upgrade, since direct upgrades to `npm@latest` are broken in npm 10.9.7 (which is bundled with Node.js 22.22.2).
Running `npm install -g npm@latest` on Node.js 22.22.2 (which bundles npm 10.9.7) fails with `MODULE_NOT_FOUND: promise-retry`. This happens because npm 11.12.0 removed `promise-retry` from its bundle (in favor of `@gar/promise-retry`). During the self-upgrade, the reify step deletes `promise-retry` from disk, and then the still-running 10.x process hits a lazy `require('promise-retry')` in `_linkBins` and blows up.
The root cause has already been fixed upstream (npm/cli#9152) and released on npm 10.9.8. However, we still need the workaround until a Node.js 22 patch release ships with npm ≥ 10.9.8.1 parent 50bb580 commit 350bc4d
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
0 commit comments