If `cache: yarn` is specified, this action fails
@v-mahabaleshwars ci sta già lavorando.
Dal 23/5/2024.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 5k
- Fork
- 1.7k
- Merge medio
- 2g 11h
- PR unite (30g)
- 3
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di actions/setup-node
-
feature request
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
actions/setup-node#1531 · 1 commento · 4 reazioni ·
-
feature request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
actions/setup-node#1634 · 1 commento ·
-
actions/setup-node#1628 · 3 commenti · 1 assegnatario ·
-
`npm config get cache` fails with `EBADDEVENGINES` when requiring newer npm versions in `devEngines` Apertafeature request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
actions/setup-node#1553 · 12 commenti · 2 reazioni ·
-
feature request
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
actions/setup-node#1428 · 1 commento · 3 reazioni ·
Tutte le issue di actions/setup-node
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
fil-donadoni/tolaria#4409 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
corsairdev/corsair#1764 ·