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

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

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 ""No pnpm version is specified""?
The action removed its implicit default, so omitting both inputs leaves it with nothing to install.
How do I fix "No pnpm version is specified"?
Pin the pnpm version explicitly

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card