v5 fails immediately when using `pnpm`
维护者通常 4 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- github-actions, node.js, typescript
调研方向
从 .github/actions/restore 工作流、actions/setup-node v5 调用以及 package.json 的 packageManager 字段开始;在 Ubuntu 上复现 v4 和 v5 引用之间的差异。检查 corepack 步骤附近的 package-manager-cache 行为,并在 v5 工作流能够在没有缺少可执行文件错误的情况下到达明确的 corepack 和 pnpm 命令时,认为该问题已解决。
由索引模型根据 Issue 内容生成。
描述
Description:
I'm using corepack to install pnpm. Using v5 the action fails immediately, afaict doesn't even make it to the corepack step.
Action version:
v5
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
"engines": {
"node": "24.7.0"
},
"packageManager": "[email protected]+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67"
Repro steps:
name: restore
runs:
using: composite
steps:
- name: Install Node.js
#uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version-file: package.json
- name: Install pnpm
shell: bash
run: |
corepack enable
corepack prepare --activate
- name: Export pnpm store path
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
- name: Store prune
shell: bash
run: pnpm store prune
Prepare all required actions
Getting action download info
Download action repository 'actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444' (SHA:a0853c24544627f65ddf259abe73b1d18a591444)
Download action repository 'actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809' (SHA:0400d5f644dc74513175e3cd8d07132dd4860809)
Run ./.github/actions/restore
Run actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
with:
node-version-file: package.json
always-auth: false
check-latest: false
token: ***
package-manager-cache: true
Resolved package.json as 24.7.0
Attempting to download 24.7.0...
(node:1991) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Acquiring 24.7.0 - x64 from https://github.com/actions/node-versions/releases/download/24.7.0-17283839804/node-24.7.0-linux-x64.tar.gz
Extracting ...
/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/32676364-91bc-4278-a2bc-700823b9c0d4 -f /home/runner/work/_temp/96a07732-bdfd-4e82-a07c-8a2a6550709e
Adding to the cache ...
Environment details
node: v24.7.0
npm: 11.5.1
yarn: 1.22.22
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.
Expected behavior:
Using v4 everything works as expected:
Prepare all required actions
Getting action download info
Download action repository 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' (SHA:49933ea5288caeca8642d1e84afbd3f7d6820020)
Download action repository 'actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809' (SHA:0400d5f644dc74513175e3cd8d07132dd4860809)
Run ./.github/actions/restore
Run actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
Resolved package.json as 24.7.0
Attempting to download 24.7.0...
Acquiring 24.7.0 - x64 from https://github.com/actions/node-versions/releases/download/24.7.0-17283839804/node-24.7.0-linux-x64.tar.gz
Extracting ...
/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/5be513fa-45a1-4cbf-b962-41ec7d0b828f -f /home/runner/work/_temp/1b86ae81-2e8a-4a03-bb71-adb4c43b321f
Adding to the cache ...
Environment details
node: v24.7.0
npm: 11.5.1
yarn: 1.22.22
Run corepack enable
corepack enable
corepack prepare --activate
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
Preparing [email protected]+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67 for immediate activation...
Run echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
Run actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809
Cache hit for restore-key: Linux-pnpm-store-b7d2050696ee54d49a8aad9d2b825770a2ccafcb302f1fb77ebbe74d6ce0757b
Received 134217728 of 153022715 (87.7%), 120.0 MBs/sec
Received 153022715 of 153022715 (100.0%), 117.9 MBs/sec
Cache Size: ~146 MB (153022715 B)
/usr/bin/tar -xf /home/runner/work/_temp/43de40db-0b79-4b5b-b9a3-f8da86ea6973/cache.tzst -P -C /home/runner/work/website/website --use-compress-program unzstd
Cache restored successfully
Cache restored from key: Linux-pnpm-store-b7d2050696ee54d49a8aad9d2b825770a2ccafcb302f1fb77ebbe74d6ce0757b
Run pnpm install --frozen-lockfile
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +810
...
Actual behavior:
Action fails immediately.
- 主要语言
- TypeScript
- 星标
- 5k
- 派生
- 1.7k
- 平均合并
- 5 天 4 小时
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
actions/setup-node 的其他 Issue
-
feature request
难度 2/5 1-3 小时 新手友好度 65/100
actions/setup-node#1531 · 1 条评论 · 4 个 reaction ·
维护者通常 4 天内回复
-
feature request
难度 5/5 一周以上 新手友好度 30/100
actions/setup-node#1634 · 1 条评论 ·
维护者通常 4 天内回复
-
Volta extends resolution in getNodeVersionFromFile has no cycle detection, recursing until stack overflow可能重新可做 @v-gowridurgad 于 31 天前认领,目前没有进行中的 PR。 未关闭bug
actions/setup-node#1628 · 3 条评论 · 已指派 1 人 ·
维护者通常 4 天内回复
-
`npm config get cache` fails with `EBADDEVENGINES` when requiring newer npm versions in `devEngines`未关闭feature request
难度 4/5 3-5 天 新手友好度 52/100
actions/setup-node#1553 · 14 条评论 · 2 个 reaction ·
维护者通常 4 天内回复
-
feature request
难度 3/5 1-2 天 新手友好度 38/100
actions/setup-node#1428 · 1 条评论 · 3 个 reaction ·
维护者通常 4 天内回复
查看 actions/setup-node 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
openwatersio/slackwater-database#281 ·
维护者通常 1 天内回复
-
accepted bug via-triage
难度 2/5 1-3 小时 新手友好度 76/100
pingdotgg/t3code#18690 · 1 条评论 ·
维护者通常 1 天内回复
-
Bayern feature:Application ready web
难度 2/5 1-3 小时 新手友好度 67/100
digitalfabrik/entitlementcard#3176 ·
维护者通常 7 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
NanmiCoder/cc-haha#1533 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复