GitHub Actions pnpm/action-setup "No pnpm version is specified"
pnpm/action-setup needs a pnpm version from either its version input or the packageManager field in package.json. With neither set, recent versions of the action refuse to guess.
What this error means
A pnpm/action-setup step fails immediately stating that no pnpm version was specified, before any install runs.
Error: Multiple versions of pnpm specified:
- no version is specified in the action config
- no "packageManager" field in package.jsonCommon causes
No version input and no packageManager field
The action removed its implicit default, so omitting both inputs leaves it with nothing to install.
packageManager field missing or malformed
A packageManager value that is absent or not pnpm@x.y.z does not satisfy the version requirement.
How to fix it
Pin the pnpm version explicitly
- Add version: to the pnpm/action-setup step, or
- Add a packageManager field to package.json (e.g. "packageManager": "pnpm@9.12.0").
- Keep setup-node cache: pnpm steps after pnpm is installed.
- uses: pnpm/action-setup@v4
with:
version: 9How to prevent it
- Set packageManager in package.json as the single source of the pnpm version.
- Order steps so pnpm install precedes any pnpm-cached setup-node step.