Skip to content

Commit 9721d7d

Browse files
fix: work around broken npm in Node 22.22.2 for publish workflow (#34)
Node 22.22.2 bundles npm 10.9.7 which has a missing promise-retry module, preventing direct upgrade to npm@11. Use a two-step upgrade (first to 11.11.0, then to latest 11) as recommended in npm/cli#9151. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1 parent bb34af3 commit 9721d7d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ jobs:
2222
registry-url: 'https://registry.npmjs.org'
2323

2424
- name: Install npm 11+ for trusted publishing (OIDC)
25-
run: npm install -g npm@11
25+
run: |
26+
# Workaround: Node 22.22.2 bundles a broken npm 10.9.7 that cannot
27+
# self-upgrade directly to npm@11 (missing promise-retry module).
28+
# See: https://github.com/npm/cli/issues/9151
29+
npm install -g npm@11.11.0
30+
npm install -g npm@11
2631
2732
- name: Check if version exists on npm
2833
id: version

0 commit comments

Comments
 (0)