Fix npm publish: bump Node to 24, pin npm to 11.x#478
Merged
Conversation
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.
|
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.



Why
After switching to trusted publishing (#476), the
v34.3.0release run failed at the new "Upgrade npm for trusted publishing" step:npm install -g npm@latestnow floats to npm 12, which requires a newer Node than the job's Node 20. The step errors before publish is ever attempted.Fix
npm@11instead of@latest. The 11.x line satisfies thenpm >= 11.5.1requirement for trusted publishing and won't drift into an incompatible major.Targets
v35(default branch); a matching fix goes tov34so thev34.3.0release can be republished viaworkflow_dispatch.