Skip to content
Latchkey

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.

github-actions
Error: Multiple versions of pnpm specified:
  - no version is specified in the action config
  - no "packageManager" field in package.json

Diagnose 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.

.github/workflows/ci.yml
- 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

  1. Add version: to the pnpm/action-setup step, or
  2. Add a packageManager field to package.json (e.g. "packageManager": "pnpm@9.12.0").
  3. Keep setup-node cache: pnpm steps after pnpm is installed.
.github/workflows/ci.yml
- uses: pnpm/action-setup@v4
  with:
    version: 9

The failures that are not your workflow

  • Exit 137 is the kernel out-of-memory killer, not an application error. Check free -h above 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.

Frequently asked questions

What causes GitHub Actions pnpm/action-setup "No pnpm version is specified"?
There are 2 common causes: no version input and no packagemanager field and packagemanager field missing or malformed. The action removed its implicit default, so omitting both inputs leaves it with nothing to install.
How do I fix GitHub Actions pnpm/action-setup "No pnpm version is specified"?
Pin the pnpm version explicitly. Add version: to the pnpm/action-setup step, or
What does GitHub Actions pnpm/action-setup "No pnpm version is specified" actually mean?
A pnpm/action-setup step fails immediately stating that no pnpm version was specified, before any install runs.
How do I stop GitHub Actions pnpm/action-setup "No pnpm version is specified" happening again?
Set packageManager in package.json as the single source of the pnpm version. The prevention section lists 2 changes that keep it from recurring.

Related guides

References

This is a setup failure, not a bug in your code. Latchkey detects, repairs, and retries it for you. Start free → 30-day trial · No credit card