Force npm self-install in release workflow#258
Conversation
Works around npm's "Cannot find module 'promise-retry'" error when upgrading to npm 11.6 over the npm 10.x bundled with Node 22. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit b412935. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
LGTM — single-line workaround for the known npm self-install bug on Node 22.
Extended reasoning...
Overview
This PR modifies a single line in .github/workflows/release.yml: adding --force to the npm install -g npm@^11.6 command in the release job's "Update npm" step. No runtime code, tests, or application logic is touched.
Security risks
None. The --force flag here instructs npm to overwrite its own binary during a global self-upgrade, which is the documented workaround for the Cannot find module 'promise-retry' error that occurs when npm 10.x (bundled with Node 22) attempts to replace itself with npm 11.x. This does not bypass any authentication, expand permissions, or introduce injection risk.
Level of scrutiny
Low. This is a CI-only, single-line change fixing a known, reproducible npm breakage with a well-understood workaround. The change is isolated to the release pipeline and has no effect on the library code or its consumers.
Other factors
The bug report flags a pre-existing ::set-output deprecation in the charts-release job, which is unrelated to this PR's change. That issue has a masked impact (a fallback in build-docker-image compensates), so it does not block this merge — but it is worth fixing separately.
Summary
Test plan
🤖 Generated with Claude Code