fix(ci): pin npm to 11.6.2 so publish-npm runs on Node 20#70
Merged
Conversation
The publish-npm job runs `npm install -g npm@latest` on a Node 20 runner. npm@latest is now 12.0.0, which requires Node >=22, so the step fails with EBADENGINE and @trycourier/cli never publishes (stuck at 3.10.1 while the Go binaries/GitHub release ship fine via goreleaser). Pin npm to 11.6.2 — the newest line that still supports Node 20 (engines: node ^20.17.0 || >=22) while retaining OIDC trusted publishing support (added in npm 11.5.1). This mirrors what courier-node's publish path uses. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
publish-npmjob inpublish-release.ymlrunsnpm install -g npm@lateston a Node 20 runner.npm@latestis now 12.0.0, which requires Node ≥22, so the step fails withEBADENGINE:Result: the Go binaries + GitHub release publish fine via goreleaser, but
@trycourier/clinever reaches npm — it's stuck at 3.10.1 while releases marched to 3.11.1.Fix
Pin npm to 11.6.2 — the newest line that still supports Node 20 (
engines: node ^20.17.0 || >=22) while keeping OIDC trusted publishing (added in npm 11.5.1). Mirrors courier-node's working publish path. One-line change.Follow-up
The npm step is upgraded specifically because Node 20's bundled npm (10.8.2) lacks OIDC trusted publishing. A more future-proof alternative is bumping the runner to Node 22 +
npm@latest; pinning is the minimal, proven fix for now.🤖 Generated with Claude Code