🐛 fix: use Corepack to upgrade npm on the publish runner - #47
Open
gabrieldejesusrodrigues wants to merge 1 commit into
Open
🐛 fix: use Corepack to upgrade npm on the publish runner#47gabrieldejesusrodrigues wants to merge 1 commit into
gabrieldejesusrodrigues wants to merge 1 commit into
Conversation
Node 22.22.2 in the GitHub Actions toolcache ships with a broken npm 10.9.7 (the promise-retry module is missing from npm's own dependency tree). That makes any "npm install -g npm@latest" fail with MODULE_NOT_FOUND, which is exactly what happened on the v0.2.2 release run. Switch to Corepack, which is bundled with Node 22 and is not affected by the broken module tree, to install npm@latest before publishing. See actions/runner-images#13883. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
Codex local PR reviewReviewed by a Codex agent on my behalf. This is still in testing.
Residual risk: I could not execute the GitHub Actions runner environment locally, so the remaining validation is a release workflow run after the shim fix. |
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.
Summary
npm install -g npm@latestwith Corepack (corepack enable && corepack prepare npm@latest --activate) in theUpgrade NPMstep of thepublish-npmjob.Why
The
v0.2.2release run failed at theUpgrade NPMstep with:This is a known bug in the GitHub Actions runner toolcache — Node 22.22.2 ships there with a broken npm 10.9.7 missing the
promise-retrymodule from its own dependency tree. Anynpm install -g npm@latesttriggers@npmcli/arborist, which needspromise-retry, and crashes before the upgrade completes.Failing run: https://github.com/wave-telecom/wave-tech-framework/actions/runs/25140740088/job/73689655205
Reference: actions/runner-images#13883, npm/cli#9151.
Corepack is bundled with Node 22 and lives outside npm's broken module tree, so it can install npm@latest cleanly.
Test plan
v0.2.3and confirm thepublish-npmjob succeeds.🤖 Generated with Claude Code