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.jsonDiagnose it: is the job queued, or is the runner gone?
A job that never starts and a job whose runner disappeared mid-run look similar in the UI and have opposite causes. The first is a labelling or capacity problem, the second is the runner being killed, usually by memory pressure or a spot reclaim.
- name: Runner facts
run: |
echo "runner name: $RUNNER_NAME"
echo "os/arch: $RUNNER_OS/$RUNNER_ARCH"
nproc; free -h; df -h /
echo "labels this job asked for: ${{ toJSON(job) }}"Common 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: 9The failures that are not your workflow
- Exit 137 is the kernel out-of-memory killer, not an application error. Check
free -habove against your peak usage. - Disk exhaustion presents as unrelated write errors deep in a build. GitHub-hosted runners ship roughly 14 GB of free space, which a Docker-heavy job can exhaust.
- A lost connection to the server on a self-hosted runner is usually the host being reclaimed or rebooted, not a network fault in your job.
- A job that starts and immediately fails with no step output normally failed during runner setup, before your workflow ran at all.
How 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.