If `cache: yarn` is specified, this action fails
@v-mahabaleshwars 已经在做这个了。
开始于 2024年5月23日。
评估
这个 Issue 还没有评估数据。
描述
Description:
If I set packageManager property in package.json and set cache: yarn in this action, this action will fail.
Related:
Action version:
v4 (v4.0.2)
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
- yarn 4.1.1
Repro steps:
This is the workflow that reproduced this issue with the minimum configuration.
https://github.com/esperecyan/actions-setup-node-debug/actions/runs/8907795048/workflow
You can confirm that the issue does not occur in the following cases:
- If I set
npmtopackageManager. - If I set
yarntopackageManagerand do not setcache: yarnfor this action.
Expected behavior:
actions/setup-node succeeds.
Actual behavior:
actions/setup-node fails with the following error.
Error: error This project's package.json defines "packageManager": "yarn@4.1.1". However the current global version of Yarn is 1.22.22.
Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack.
https://github.com/esperecyan/actions-setup-node-debug/actions/runs/8907795048/job/24462266566
Running corepack enable before actions/setup-node will avoid this issue.
https://github.com/esperecyan/actions-setup-node-debug/actions/runs/8907795048/job/24462266822
- 主要语言
- TypeScript
- 星标
- 5k
- 派生
- 1.7k
- 平均合并
- 2 天 11 小时
- 30 天内合并 PR
- 3
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 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 ·
-
feature request
难度 5/5 一周以上 新手友好度 30/100
actions/setup-node#1634 · 1 条评论 ·
-
actions/setup-node#1628 · 3 条评论 · 已指派 1 人 ·
-
`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 · 12 条评论 · 2 个 reaction ·
-
feature request
难度 3/5 1-2 天 新手友好度 38/100
actions/setup-node#1428 · 1 条评论 · 3 个 reaction ·
查看 actions/setup-node 的全部 Issue
相似的 Issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 1/5 1 小时以内 新手友好度 85/100
-
Mend: dependency security vulnerability untriaged
难度 2/5 1-3 小时 新手友好度 70/100