GitHub Actions: "Unable to locate executable file: pnpm"
To cache pnpm's downloads, actions/setup-node asks pnpm where its store is (pnpm store path --silent). pnpm was not installed yet in that job, so the step failed before anything was installed. The fix is almost always the order of the steps, or turning off a cache you did not ask for.
What it looks like
Error: Unable to locate executable file: pnpm. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
It comes a few seconds into the setup-node step, right after the step prints the versions of node, npm and yarn. On Windows runners the last sentence is about a valid extension for an executable file instead.
1. setup-node v5 and a packageManager field
setup-node v5.0.0 (September 2025) turned caching on by itself when package.json has a packageManager field, with no cache input. With "packageManager": "pnpm@…" it runs pnpm. v6.0.0 (October 2025) limited the automatic cache to npm.
- In tafsila, moving to v5 broke a job that needs only Node; the workflow that runs
pnpm/action-setupfirst kept working (tafsila #42). - In pinsel the workflows enable pnpm with
corepack enablein the next step, too late (pinsel #24). - A shared pull request check that installs nothing failed in a repository with
"packageManager": "pnpm@11.20.0"(repo-canon #55).
Move to v6 or later, or keep v5 and turn the automatic cache off:
- uses: actions/setup-node@v5
with:
node-version: 24
package-manager-cache: false
2. cache: pnpm comes before pnpm is installed
With cache: pnpm, every setup-node version needs pnpm already on the PATH. In blog-upiscium-dev the deploy ran actions/setup-node with cache: pnpm before pnpm/action-setup (blog-upiscium-dev #24), and in shipping-container-sims every job failed the same way (shipping-container-sims #83). The action's advanced usage guide uses this order:
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
Without version, pnpm/action-setup reads it from the packageManager field, which is why checkout comes first. Give the version in one place only: if both are set and differ, it stops with "Multiple versions of pnpm specified".
3. pnpm comes from Corepack
- Run after setup-node,
corepack enableis too late for setup-node's own cache step. Keep Corepack only with the cache off (nocache: pnpm, andpackage-manager-cache: falseon v5), or usepnpm/action-setupinstead. - With Node.js 25 or later there is no
corepackcommand to enable: Node.js 25.0.0 stopped distributing Corepack (nodejs/node #57617). Anode-versionof 25 or 26 needspnpm/action-setupor another way to install pnpm.
4. pnpm was installed in another job
Each job starts on its own runner, and what one job installs is not on the next job's PATH. In tafsila the failing job had no pnpm step at all (#42 above). Every job that runs setup-node with pnpm caching, or runs pnpm, needs its own pnpm/action-setup.
Telling it apart
- "pnpm: command not found" in a
runstep, with exit code 127: the same missing pnpm, reported by the shell instead of by an action. - "Dependencies lock file is not found ... Supported file patterns: pnpm-lock.yaml": pnpm was found, but there is no
pnpm-lock.yamlat the top of the workspace. - "Multiple versions of pnpm specified":
pnpm/action-setupgot aversioninput and a differentpackageManagerfield (2).
See failed jobs from IntelliJ IDEA
Pipeline Inbox for GitHub Actions Workflows, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the runs of all your repositories in an IDE tool window, with their jobs and steps, and your current branch's runs are in the status bar. Reading is free; re-running failed jobs, cancelling, running workflows and reviewing deployments are Pro (US$1.50 a month, with a 30-day trial).
GitHub and GitHub Actions are trademarks of GitHub, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with, sponsored or endorsed by GitHub, Inc. or JetBrains.
More: "Dependencies lock file is not found" · "Cache not found for input keys" · The "Node.js 20 is deprecated" warning · GitHub Actions plugins for IntelliJ IDEA compared · 日本語