Skip to content

fix(ci): move to pnpm 11, the version CI actually installs - #10

Merged
squarezw merged 1 commit into
mainfrom
chore/upgrade-pnpm-11
Aug 5, 2026
Merged

fix(ci): move to pnpm 11, the version CI actually installs#10
squarezw merged 1 commit into
mainfrom
chore/upgrade-pnpm-11

Conversation

@squarezw

@squarezw squarezw commented Aug 5, 2026

Copy link
Copy Markdown
Owner

What broke

CI went red on 2026-08-05 with nothing changed in the repo:

[ERROR] Cannot verify the identity of the @pnpm/exe.linux-x64 native binary:
        it is missing from pnpm-lock.yaml

RUN npm install -g pnpm is unpinned, so each build installs whatever pnpm is newest at that moment. The 08-03 build got pnpm 10; by 08-05 it got 11. pnpm 11 read packageManager: pnpm@10.26.2, tried to switch itself down to that version, and refused because it couldn't verify that binary against the lockfile.

The repo was untouched — only upstream's release schedule changed. That's the nastiest failure mode: the first instinct is to blame the last commit, and the last commit is innocent. Confirmed the last change touched neither package.json nor pnpm-lock.yaml, and next build passes locally.

The approach

Follow what CI installs rather than pinning against it: packageManager11.20.0.

The lockfile needs no changes — regenerating with pnpm 11 produces a byte-identical file, so no dependency versions move.

Why two more files change

pnpm 11 then failed on something else:

[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: @parcel/watcher, @swc/core, sharp

pnpm 11 turns "a dependency's build script was skipped" from a warning into a hard error — supply-chain hardening: every script-running dependency needs a recorded decision instead of silently executing.

All three are recorded as false, which keeps today's behaviour — these scripts never ran under pnpm 10 either and the image has always worked (their native binaries come from prebuilt per-platform packages). Setting them to true would be a behaviour change (sharp might compile from source, affecting build time and the artifact) and doesn't belong in a "fix CI" commit. Easy to revisit deliberately.

That decision has to live in pnpm-workspace.yaml: since v11, pnpm no longer reads settings from package.json's pnpm field. Confirmed the hard way — putting ignoredBuiltDependencies in package.json changed nothing, the install failed identically.

Which is also why the Dockerfile's COPY line grows one file. It copied only package.json and pnpm-lock.yaml, so the config never reached the image and the install kept failing with the same error — and that error says nothing about a missing file, hence the comment above the line.

Verification

  • pnpm install --frozen-lockfile succeeds under pnpm 11.20.0
  • docker build --target builder completes: Done in 10s using pnpm v11.20.0

One thing this PR does not claim: next build now emits a Can't resolve 'supports-color' warning (optional dependency of debug, reached via axios). It's a warning, the build completes. I could not establish whether it predates this change — the successful 08-03 CI log is truncated at 400KB before the build output, and the local A/B comparison couldn't be finished. Flagging it rather than asserting it's harmless.

🤖 Generated with Claude Code

CI went red on 2026-08-05 with nothing changed in the repo:

    [ERROR] Cannot verify the identity of the @pnpm/exe.linux-x64 native
            binary: it is missing from pnpm-lock.yaml

`RUN npm install -g pnpm` is unpinned, so each build installs whatever pnpm is
newest at that moment. The 08-03 build got pnpm 10; by 08-05 it got 11. pnpm 11
read `packageManager: pnpm@10.26.2`, tried to switch itself down to that version,
and refused because it couldn't verify that binary. The repo was untouched — only
upstream's release schedule changed.

Rather than pinning, this follows what CI installs: `packageManager` moves to
11.20.0. **The lockfile needs no changes** — not one line differs after
regenerating with pnpm 11, so no dependency versions move.

## Why the two other files change

pnpm 11 then failed on something else:

    [ERR_PNPM_IGNORED_BUILDS] Ignored build scripts:
        @parcel/watcher, @swc/core, sharp

pnpm 11 turns "a dependency's build script was skipped" from a warning into a hard
error — supply-chain hardening: every script-running dependency needs a recorded
decision instead of silently executing.

All three are recorded as `false`, which **keeps today's behaviour**: these scripts
never ran under pnpm 10 either and the image has always worked (their native
binaries come from prebuilt per-platform packages). Setting them to `true` would be
a behaviour change — sharp might compile from source, which affects build time and
the artifact — and that doesn't belong in a "fix CI" commit.

The decision has to live in `pnpm-workspace.yaml`: since v11 pnpm no longer reads
settings from package.json's `pnpm` field. Confirmed the hard way — putting
`ignoredBuiltDependencies` in package.json changed nothing.

Which is also why the Dockerfile's COPY line grows a file. It copied only
package.json and pnpm-lock.yaml, so the config never reached the image and the
install kept failing with the same error — and that error says nothing about a
missing file, so this is worth a comment rather than rediscovering it later.

## Verification

Locally: `pnpm install --frozen-lockfile` succeeds under pnpm 11.20.0, and
`docker build --target builder` completes (`Done in 10s using pnpm v11.20.0`).

One thing this commit does **not** claim: `next build` now emits a
`Can't resolve 'supports-color'` warning (optional dependency of `debug`, reached
through axios). It is a warning, not an error, and the build completes. I could not
establish whether it predates this change — the successful 08-03 CI log is truncated
at 400KB before the build output, and the local A/B comparison couldn't be finished.
Worth a look if anything about axios logging misbehaves.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@squarezw
squarezw merged commit 56556a7 into main Aug 5, 2026
1 check passed
@squarezw
squarezw deleted the chore/upgrade-pnpm-11 branch August 5, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant