-
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
Update to use latest corepack version with updated npm registry keys #1222
Comments
A
|
Hi @koodiohto, |
Corepack is broken in v4.2.0. See: actions/setup-node#1222
Corepack is broken in v4.2.0. See: actions/setup-node#1222
The workaround: Log: 3_Install.txt Workaround for windows is to only run on Node 23.x since it has the latest version of corepack. |
Hello everyone 👋, As @koodiohto correctly mentioned, Corepack updated npm registry keys in the latest version. The issue appears to be due to Corepack 0.29.4 bundled with Node.js 20.18.2, which doesn't include the updated npm registry keys. The relevant issue in nodejs/corepack#627 might be worth following for any updates from the node.js team. To fix this issue we recommend using the latest Node.js versions if possible. Alternatively, as a potential workaround, you can use the pnpm/action-setup action before the
Hope this helps! |
Thank you for the summary. I think this issue can be closed, since it really is a NodeJS issues, not |
We might need some help on how to install the latest corepack on Windows. As mentioned here: nodejs/corepack #627, the installed version corepack will get picked up before the version from |
This did not help, logs https://github.com/databendlabs/bendsql/actions/runs/13190663019/job/36822890057?pr=585 |
@sundy-li In my case, it works if you remove following part. https://github.com/databendlabs/bendsql/actions/runs/13190663019/job/36822890057?pr=585#step:6:2 |
Hello @Jason3S👋, Hello @sundy-li👋, Using the Since this issue is not related to |
Thank you for checking. But, it still doesn't work on the standard GitHub hosted environment. I'll make an example. |
Hello @Jason3S👋, |
There are two different things going on here:
The workaround is to only test windows on the latest version of nodejs. |
The actions/setup-node@v4 action fails because it cannot correctly use corepack. To fix that I implemented workaround. It installs corepack via npm and then enables it. We cannot remove it, because pkg.pr.new needs corepack in order to work. See: actions/setup-node#1222 (comment)
The actions/setup-node@v4 action fails because it cannot correctly use corepack. To fix that I implemented workaround. It installs corepack via npm and then enables it. We cannot remove it, because pkg.pr.new needs corepack in order to work. See: actions/setup-node#1222 (comment)
Hello @Jason3S 👋, Thank you for your input. As you correctly mentioned, using the latest Node.js versions is a potential workaround to avoid the corepack signature issue. You can use the check-latest: true input with the Additionally, the corepack bundled with Node.js in the hosted toolcache is appearing earlier in the PATH than the globally installed version, causing conflicts on Windows. This behaviour is specific to the Windows OS due to the way the PATH is constructed and managed in the environment. - name: Clear hosted toolcache for corepack
run: Remove-Item -Recurse -Force "C:\hostedtoolcache\windows\node\$nodeVersion\x64\corepack*" This will ensure that the globally installed version of corepack is used. Please refer to the successful run and related workflow here. |
Thank you for the amazing response. |
At first, I wasn't sure where it put the For anyone that comes here later, this is what I ended up using: steps:
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4.2.0
with:
registry-url: 'https://registry.npmjs.org'
node-version: 20.x
cache: 'pnpm'
- name: Clear hosted tool-cache for corepack
# See: [actions/setup-node/issues/1222](https://github.com/actions/setup-node/issues/1222#issuecomment-2673608477)
if: runner.os == 'Windows'
run: Remove-Item -Recurse -Force (Get-Command corepack.cmd).Path
shell: pwsh
- name: Install Corepack
# See: [actions/setup-node/issues/1222](https://github.com/actions/setup-node/issues/1222)
run: |
npm i -g --force corepack
shell: bash
- name: Enable Corepack
run: |
corepack enable
pnpm -v
shell: bash |
Description:
Currently all our GitHub Actions workflows which use actions/setup-node@v4 fail for error:
I think the actions/setup-node@v4 should use the latest release version of corepack where the npm registry keys have been updated.
Action version:
v4
Platform:
Runner type:
Tools version:
Node.js: 20.18.2
Package Manager: pnpm 9.x
Repro steps:
Use the actions/setup-node@v4 in a GitHub Actions workflow.
Expected behavior:
The setup-node action should install Node.js and configure the package manager without encountering Corepack signature verification errors.
Actual behavior:
The setup-node fails immediately due to Corepack being unable to verify the signature of the npm registry key.
The text was updated successfully, but these errors were encountered: