fix(ci): pin Node to 22 LTS — 24.17.0 breaks node-fetch#4
Merged
Conversation
Node 24.17.0 (what `.node-version: 24` resolves to on the runner) breaks node-fetch@2.7.0 against api.github.com with "Premature close". That is the HTTP client @changesets/get-github-info uses, so changelog generation fails during `changeset version` and blocks the release. Reproduced with the same token, query, and node-fetch@2.7.0: Node 24.17.0 throws even on a trivial query, while 24.16.0 and 22.23.1 succeed. Pin to Node 22 LTS in .node-version and mise.toml. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Root cause
The
Releaseworkflow fails atchangeset versionwith:It is not the token, permissions, the query, or the data. It is Node 24.17.0, which
.node-version: 24resolves to on the runner. That version breaksnode-fetch@2.7.0(the HTTP client@changesets/get-github-infouses) againstapi.github.com— the response body is cut off mid-stream.Reproduced locally with the same token, query, and
node-fetch@2.7.0:Premature close— even on a trivial{ repository { name } }queryFix
Pin Node to 22 LTS in
.node-versionandmise.toml. LTS avoids the bleeding-edge 24.x patch that introduced the regression.Notes
GITHUB_TOKENis kept — it works fine on a healthy Node.node-fetch/changesets ship a fix for Node 24.17+, the pin can move back to24.🤖 Generated with Claude Code