fix(ci): align npm to packageManager to unblock npm ci - #169
Conversation
The CI runner's bundled npm 10.x cannot read the npm-11 lockfile: `npm ci` fails with a false "react@18.3.1 missing from lock file" on both the React 18 and 19 matrix jobs, leaving main red since the React 19 switch. Install the packageManager-declared npm (11.12.1) before `npm ci`. Also bump actions/setup-node v6 -> v7.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 142b9bd920
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Align npm to packageManager | ||
| run: npm install -g npm@11.12.1 |
There was a problem hiding this comment.
Align npm in the Pages workflow too
On every push to main, .github/workflows/pages.yml still selects Node 20 and immediately runs npm ci without upgrading its bundled npm 10.x. Because that job consumes the same npm-11-generated lockfile identified here as incompatible with npm 10, the Pages deployment will continue failing before npm run docs:build; apply the package-manager alignment to that workflow as well.
Useful? React with 👍 / 👎.
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - uses: actions/setup-node@v6 | ||
| - uses: actions/setup-node@v7 |
There was a problem hiding this comment.
Keep setup-node on an existing major
actions/setup-node@v7 does not identify a released action version; this repository's Dependabot history upgraded setup-node to the available v6 while its other workflows also remain on v6. Consequently, every CI matrix job will fail while resolving the action, before the new npm-alignment step can run, so keep this reference on v6 unless a real v7 release is available.
Useful? React with 👍 / 👎.
The CI runner ships npm 10.x; its
npm cimisreads the npm-11 lockfile (react@18.3.1 missing), failing both React 18 and 19 matrix jobs. main has been red since the React 19 switch.Install the packageManager-declared npm (11.12.1) before
npm ci. Bump actions/setup-node v6 → v7.Note: editing the workflow file suppresses pull_request CI, so this is validated by the main push run after merge (matches the local npm 11 verification already done in #167).