Skip to content

fix(ci): pin Node to 22 LTS — 24.17.0 breaks node-fetch#4

Merged
rqbazan merged 1 commit into
mainfrom
fix/pin-node-22
Jun 29, 2026
Merged

fix(ci): pin Node to 22 LTS — 24.17.0 breaks node-fetch#4
rqbazan merged 1 commit into
mainfrom
fix/pin-node-22

Conversation

@rqbazan

@rqbazan rqbazan commented Jun 28, 2026

Copy link
Copy Markdown
Member

Root cause

The Release workflow fails at changeset version with:

🦋  error Invalid response body while trying to fetch https://api.github.com/graphql: Premature close
   at @changesets/get-github-info@0.8.0/.../changesets-get-github-info.cjs.js:185

It is not the token, permissions, the query, or the data. It is Node 24.17.0, which .node-version: 24 resolves to on the runner. That version breaks node-fetch@2.7.0 (the HTTP client @changesets/get-github-info uses) against api.github.com — the response body is cut off mid-stream.

Reproduced locally with the same token, query, and node-fetch@2.7.0:

Node result
24.17.0 (CI) Premature close — even on a trivial { repository { name } } query
24.16.0 ✅ 200
22.23.1 (LTS) ✅ 200

Fix

Pin Node to 22 LTS in .node-version and mise.toml. LTS avoids the bleeding-edge 24.x patch that introduced the regression.

Notes

  • This supersedes the token change in fix(ci): use default GITHUB_TOKEN for changesets changelog step #3 as the actual fix (that diagnosis was wrong; the token swap is harmless but unrelated). The default GITHUB_TOKEN is kept — it works fine on a healthy Node.
  • Once node-fetch/changesets ship a fix for Node 24.17+, the pin can move back to 24.

🤖 Generated with Claude Code

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>
@changeset-bot

changeset-bot Bot commented Jun 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d5bedae

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@rqbazan rqbazan merged commit d799238 into main Jun 29, 2026
1 of 2 checks passed
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