-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If cache: yarn
is specified, this action fails
#1027
Comments
Hello @esperecyan |
Hitting this today too. |
$ yarn add -D @typescript-eslint/{parser,eslint-plugin}@npm:rc-v8 $ yarn dedupe $ yarn set version latest # fix yarnpkg/berry#6219 * remove `yarnPath` to prefer corepack @ .yarnrc.yml @ fe * run `corepack enable` to fix actions/setup-node#1027 @ .github/actions/fe/action.yml
works only for node 18+ for node 14-16 see #1075 (comment) |
Still there, 2025. steps:
- uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable
- name: Setup Node.js Environment
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
# https://github.com/actions/setup-node/issues/1027
cache: 'yarn'
|
One thing to note is that OP explicitly states they're using For what it's worth, the reported issue is not encountered using the following workflow steps (no Corepack needed):
|
Description:
If I set
packageManager
property inpackage.json
and setcache: yarn
in this action, this action will fail.Related:
Action version:
v4 (v4.0.2)
Platform:
Runner type:
Tools version:
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:
npm
topackageManager
.yarn
topackageManager
and do not setcache: yarn
for this action.Expected behavior:
actions/setup-node
succeeds.Actual behavior:
actions/setup-node
fails with the following error.Running
corepack enable
beforeactions/setup-node
will avoid this issue.https://github.com/esperecyan/actions-setup-node-debug/actions/runs/8907795048/job/24462266822
The text was updated successfully, but these errors were encountered: