Skip to content

Fix npm publish: bump Node to 24, pin npm to 11.x#478

Merged
ndrezn merged 1 commit into
v35from
fix-npm-node-version-v35
Jul 16, 2026
Merged

Fix npm publish: bump Node to 24, pin npm to 11.x#478
ndrezn merged 1 commit into
v35from
fix-npm-node-version-v35

Conversation

@ndrezn

@ndrezn ndrezn commented Jul 16, 2026

Copy link
Copy Markdown
Member

Why

After switching to trusted publishing (#476), the v34.3.0 release run failed at the new "Upgrade npm for trusted publishing" step:

npm error code EBADENGINE
npm error notsup Not compatible with your version of node/npm: npm@12.0.1
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"}

npm install -g npm@latest now floats to npm 12, which requires a newer Node than the job's Node 20. The step errors before publish is ever attempted.

Fix

  • Bump the publish job to Node 24 (also clears the Node 20 deprecation warning).
  • Pin the upgrade to npm@11 instead of @latest. The 11.x line satisfies the npm >= 11.5.1 requirement for trusted publishing and won't drift into an incompatible major.

Targets v35 (default branch); a matching fix goes to v34 so the v34.3.0 release can be republished via workflow_dispatch.

The trusted-publishing upgrade step ran npm install -g npm@latest, which
now resolves to npm 12.x. npm 12 requires Node >= 22.22/24.15, but the
job runs Node 20, so the step fails with EBADENGINE before publish.

Bump the job to Node 24 (also clears the Node 20 deprecation warning) and
pin the upgrade to the 11.x line, which satisfies the npm >= 11.5.1
requirement for trusted publishing.
@sonarqubecloud

Copy link
Copy Markdown

@BSd3v BSd3v left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃

@ndrezn
ndrezn merged commit 13eef10 into v35 Jul 16, 2026
2 of 3 checks passed
@ndrezn
ndrezn deleted the fix-npm-node-version-v35 branch July 16, 2026 15:46
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.

2 participants