Skip to content

ci: fix npm publish workflow#15

Merged
NirBarak-RecoLabs merged 1 commit into
mainfrom
fix-publish-npm-node24
Apr 26, 2026
Merged

ci: fix npm publish workflow#15
NirBarak-RecoLabs merged 1 commit into
mainfrom
fix-publish-npm-node24

Conversation

@NirBarak-RecoLabs
Copy link
Copy Markdown
Collaborator

Summary

The Publish NPM workflow has been failing at the npm install -g npm@latest step on ubuntu-latest with:

npm error code MODULE_NOT_FOUND
npm error Cannot find module 'promise-retry'

This is a deterministic self-corruption bug in the bundled-npm → npm@latest in-place upgrade path on Node 22 — it left @npmcli/arborist unable to resolve promise-retry and blocked the v0.2.2 release (see run 24951082111).

The original step exists only to obtain an npm version new enough for trusted publishing. Node 24 already ships with such an npm, so this PR:

  • Bumps actions/setup-node to node-version: '24'
  • Drops the brittle npm install -g npm@latest step entirely

Once merged, the publish workflow can be re-run against tag v0.2.2 to ship the release.

Test plan

  • CI green on this PR
  • After merge, re-run the Publish NPM workflow on tag v0.2.2 and confirm the package is published to npm

The publish workflow upgraded npm via `npm install -g npm@latest` to
obtain a version that supports trusted publishing. On the current
ubuntu-latest runner this corrupts the bundled npm and fails with
`Cannot find module 'promise-retry'`, blocking releases on every tag
push.

Bumping `setup-node` to Node 24 ships an npm new enough for trusted
publishing out of the box, so the in-place upgrade step is dropped.
@NirBarak-RecoLabs NirBarak-RecoLabs merged commit 9e12a48 into main Apr 26, 2026
2 checks passed
@NirBarak-RecoLabs NirBarak-RecoLabs deleted the fix-publish-npm-node24 branch April 26, 2026 07:28
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