Skip to content

fix(release): run npm publish job on Node 22 - #316

Merged
leggetter merged 1 commit into
mainfrom
fix/npm-publish-node-version
Jul 30, 2026
Merged

fix(release): run npm publish job on Node 22#316
leggetter merged 1 commit into
mainfrom
fix/npm-publish-node-version

Conversation

@leggetter

Copy link
Copy Markdown
Collaborator

Problem

The v2.3.0 release workflow failed to publish to npm. GoReleaser succeeded (GitHub artifacts, Homebrew, Scoop, Docker), but the publish-npm job failed at "Upgrade npm to latest version":

npm error notsup Not compatible with your version of node/npm: npm@12.0.2
npm error notsup Required: {"node":"^22.22.2 || ^24.15.0 || >=26.0.0"}
npm error notsup Actual:   {"npm":"10.8.2","node":"v20.20.2"}

The job pins Node 20; npm install -g npm@latest now resolves to npm@12, which dropped Node 20 support, so the upgrade aborts before npm publish runs.

Fix

Run the publish-npm job on Node 22.x. npm publish --provenance (OIDC trusted publishing) needs a recent npm, so bumping Node is the right fix rather than pinning npm to an older version.

Impact

Fixes npm publishing for all future releases. Does not by itself re-publish v2.3.0 to npm — that needs a separate remediation (re-tag or manual publish), tracked separately.

🤖 Generated with Claude Code

The publish-npm job pinned Node 20 and then ran `npm install -g npm@latest`.
npm@12 dropped Node 20 support (requires Node ^22.22 || ^24.15 || >=26), so the
upgrade aborts with EBADENGINE before `npm publish` runs — which is why v2.3.0
built and released everywhere (GitHub artifacts, Homebrew, Scoop, Docker) but
was never published to npm. `npm publish --provenance` needs a recent npm, so
the fix is to run this job on Node 22.x rather than downgrade npm.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016QCuRsTPjpi6hbu9WSaE5J
@leggetter
leggetter merged commit 3d0bfbc into main Jul 30, 2026
12 checks passed
@leggetter
leggetter deleted the fix/npm-publish-node-version branch July 30, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant