From 142b9bd920ee3e557f506a62d55e2e39740ce5c8 Mon Sep 17 00:00:00 2001 From: nerdchanii Date: Mon, 10 Aug 2026 11:24:18 +0900 Subject: [PATCH] fix(ci): align npm to packageManager to unblock npm ci 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. --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e732d21..3581a61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,10 +15,15 @@ jobs: react-version: [18, 19] steps: - uses: actions/checkout@v7 - - uses: actions/setup-node@v6 + - uses: actions/setup-node@v7 with: node-version: 20 cache: npm + # package.json declares packageManager: npm@11.12.1. The runner ships npm + # 10.x, whose `npm ci` misreads the npm-11 lockfile (false "react@18.3.1 + # missing"). Pin npm to the declared version before installing. + - name: Align npm to packageManager + run: npm install -g npm@11.12.1 - run: npm ci - run: npm install --no-save react@${{ matrix.react-version }} react-dom@${{ matrix.react-version }} - run: npm run lint