From 350bc4d81d6aa8447277f9ee5c5d00f1d5c90c5c Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Fri, 10 Apr 2026 11:00:13 +0200 Subject: [PATCH 1/2] chore: work around Node.js 22 / npm issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (https://github.com/npm/cli/pull/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. --- .github/workflows/publish-on-tag.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-on-tag.yml b/.github/workflows/publish-on-tag.yml index 6dd3df602c..de66c2011d 100644 --- a/.github/workflows/publish-on-tag.yml +++ b/.github/workflows/publish-on-tag.yml @@ -20,7 +20,9 @@ jobs: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' - name: Update npm - run: npm install -g npm@latest + run: | + npm install -g npm@~11.10.0 # Workaround for https://github.com/npm/cli/issues/9151. + npm install -g npm@latest - name: Publish run: | npm publish --provenance --access public From 371e82da0ff89e735ca24b606f67819c928b1251 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Fri, 10 Apr 2026 11:07:38 +0200 Subject: [PATCH 2/2] chore: remove the `npm install -g npm@latest` step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was initially added because it was needed for Trusted Publishing at the time. Nowadays the bundled npm is modern enough that we don’t need to force the latest version anymore. --- .github/workflows/publish-on-tag.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/publish-on-tag.yml b/.github/workflows/publish-on-tag.yml index de66c2011d..385f95faaf 100644 --- a/.github/workflows/publish-on-tag.yml +++ b/.github/workflows/publish-on-tag.yml @@ -19,10 +19,6 @@ jobs: with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' - - name: Update npm - run: | - npm install -g npm@~11.10.0 # Workaround for https://github.com/npm/cli/issues/9151. - npm install -g npm@latest - name: Publish run: | npm publish --provenance --access public