Skip to content

fix(ci): publish on Node 24 - #652

Merged
Donny/강동윤 (kdy1) merged 1 commit into
swc-project:mainfrom
brettgoss:fix-npm-publish-node-version
Aug 12, 2026
Merged

fix(ci): publish on Node 24#652
Donny/강동윤 (kdy1) merged 1 commit into
swc-project:mainfrom
brettgoss:fix-npm-publish-node-version

Conversation

@brettgoss

Copy link
Copy Markdown
Contributor

Fixes #650.

npm install -g npm@latest now resolves npm 12, which requires Node ^22.22.2 || ^24.15.0 || >=26.0.0. The workflow pins Node 20, so the step fails before pnpm publish runs:

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"}

Every publish since 2026-07-13 failed this way (runs 296–299), so swc_core v73–v76 never reached npm.

Node 24 bundles npm 11.17.0, already above the 11.5.1 floor trusted publishing needs, so the step is removed rather than re-pinned — that drops npm@latest as a recurring break. Node 20 is also deprecated on GHA runners.

Not covered here: the four missed versions (@swc/plugin-styled-jsx 13.16.0–13.19.0 and siblings) still need publishing. Re-running the failed runs replays the Node 20 workflow, and the publish environment is restricted to main, so that needs a maintainer decision.

Overlaps with #651, which fixes the same root cause via Node 22; that one keeps the npm@latest step and adds NPM_TOKEN auth, which would sidestep the OIDC trusted publishing added in #528.

npm 12 requires Node ^22.22.2 || ^24.15.0 || >=26.0.0, so
`npm install -g npm@latest` fails with EBADENGINE on the pinned Node 20.
That has blocked every publish since 2026-07-13.

Node 24 bundles npm 11.17.0, which already satisfies the npm >= 11.5.1
floor for trusted publishing, so the global npm install is no longer
needed.
@changeset-bot

changeset-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a8a29c1

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

@CLAassistant

CLAassistant commented Aug 11, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@kdy1
Donny/강동윤 (kdy1) merged commit 0f70994 into swc-project:main Aug 12, 2026
11 of 12 checks passed
@brettgoss
Brett Goss (brettgoss) deleted the fix-npm-publish-node-version branch August 12, 2026 06:49
@brettgoss

Copy link
Copy Markdown
Contributor Author

Donny/강동윤 (@kdy1) After this merged, the EBADENGINE failure is fixed, but the run got as far as publishing with provenance, then died with this:

npm error code TLOG_CREATE_ENTRY_ERROR
npm error error creating tlog entry - (409) an equivalent entry already exists in
the transparency log

I think it's just a transient error that might resolve on a re-run, but as it stands, half of the plugins are published under .19.0 and the other half are still on .15.0. Link to the run: https://github.com/swc-project/plugins/actions/runs/31559691319

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

NPM publishing pipeline is broken since Jul 13

3 participants