Skip to content

Commit 9af70f6

Browse files
committed
ci(docker): pin setup-node to v4 to avoid v5 pnpm auto-cache breakage
Previous commit removed pnpm/action-setup, but that broke a different thing: setup-node@v5 still tries to invoke pnpm at setup time when it auto-detects the packageManager field in package.json, and now no pnpm exists on PATH ("Unable to locate executable file: pnpm"). Restoring pnpm setup AND pinning setup-node to v4. v4 doesn't have the aggressive auto-cache behavior that caused the original "Path Validation Error" failure. The other workflows (ci.yaml, test.yaml, publish.yaml) keep v5 because they actually run `pnpm install` so the store path exists when v5 tries to cache it.
1 parent 7675bb0 commit 9af70f6

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/docker.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,17 @@ jobs:
5656
- name: Checkout
5757
uses: actions/checkout@v5
5858

59-
# No pnpm/action-setup here: this workflow only runs
60-
# `node --experimental-strip-types scripts/generate.ts` on the
61-
# runner (zero deps); the actual builds happen inside Docker.
62-
# Including pnpm makes setup-node@v5 auto-detect it via
63-
# packageManager + PNPM_HOME and try to save a cache for an
64-
# empty store, which fails with "Path Validation Error".
59+
- name: Setup pnpm
60+
uses: pnpm/action-setup@v6
61+
62+
# Pinned to v4: setup-node@v5 auto-detects pnpm via the
63+
# packageManager field in package.json and tries to cache the
64+
# store, which fails here because this workflow doesn't run
65+
# `pnpm install` on the runner — the store path doesn't exist
66+
# and v5 promotes the "missing path" warning to an error.
67+
# Sticking to v4 until v5's auto-cache can be opted out cleanly.
6568
- name: Setup Node.js
66-
uses: actions/setup-node@v5
69+
uses: actions/setup-node@v4
6770
with:
6871
node-version: '22'
6972

0 commit comments

Comments
 (0)