Skip to content

Commit 2772399

Browse files
committed
ci: pin npm to 11.13.0 in CI workflows and Dockerfile
The lock file is generated locally with npm 11, which prunes optional peer-dep entries that npm 10 (bundled with node:22-slim and the npm shipped with setup-node@v4) still records. After bumping pkc-js to 0.0.25, this caused `npm ci` to fail on all three matrix runners and the Docker deps smoke build with: Missing: @types/react@19.2.14 from lock file Pinning CI to npm 11.13.0 (matching the local install) keeps the lock file authoritative without having to regenerate it under an older npm.
1 parent 6ba84ac commit 2772399

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/CI-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
node-version: 22
3636
cache: 'npm'
3737
registry-url: 'https://registry.npmjs.org'
38+
- run: npm install -g npm@11.13.0
3839

3940
# build dist folder
4041
- run: npm ci

.github/workflows/CI.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
with:
4747
node-version: 22
4848
cache: 'npm'
49+
- run: npm install -g npm@11.13.0
4950

5051
- name: Smoke test Docker deps stage
5152
if: matrix.os == 'ubuntu-latest'

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
FROM node:22-slim AS builder
33

44
RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates python3 make g++ && rm -rf /var/lib/apt/lists/*
5+
RUN npm install -g npm@11.13.0
56

67
WORKDIR /app
78

@@ -22,6 +23,7 @@ RUN --mount=type=secret,id=github_token \
2223
FROM node:22-slim AS deps
2324

2425
RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates python3 make g++ && rm -rf /var/lib/apt/lists/*
26+
RUN npm install -g npm@11.13.0
2527

2628
WORKDIR /app
2729

0 commit comments

Comments
 (0)