-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Errors out on npm cache (no changes, worked fine until now) #1275
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
Comments
Same! |
Hi @bhaugeea, thanks for reporting this issue! The error is occurring because To fix this and prevent any further caching problems, please update your workflows to use For more details, you can refer to the discussion here: GitHub Actions Toolkit Discussion. Feel free to reach out if you need further assistance or clarification! |
For what it's worth, it appears that something was fixed so that v2's cache failure doesn't fail the action, it just presumably doesn't use the cache. Still deprecated but seems to be working again. |
Hi @bhaugeea, While To avoid any interruptions and ensure ongoing reliability, we strongly recommend migrating to If you encounter any challenges during the migration or need further assistance, please feel free to reach out. |
I’m the guy showing up right on April 15th! 😅
Thanks for the information! |
We're on setup-node@v4.0.4 and still hitting this as a warning with
During the Post job cleanup, it is failing out pipeline with an error:
which I'm currently suspecting is due to the cache miss. |
Hi @leoskyrocker 👋, uses: actions/setup-node@v4 # Or actions/setup-node@v4.4.0 Let us know if that works or if you run into any further issue. |
I use the v4 but still get the same error |
This should solve issues with the cache service (error 422) See actions/setup-node#1275 (comment)
Hi @OgDev-01 👋,
|
Hello @priyagupta108 👋 steps:
- name: "☁️ checkout repository"
uses: actions/checkout@v4
- name: "🔧 setup node"
uses: actions/setup-node@v4
with:
node-version: 21
- name: "🔧 install npm@latest"
run: npm i -g npm@10.5.0
- name: "📦 install dependencies"
uses: bahmutov/npm-install@v1.8.15
Install dependencies step throws this error |
I was able to fix the error by changing |
Reference: actions/setup-node#1275 PiperOrigin-RevId: 748399822
* bazelbuild/setup-bazelisk: v2 -> v3 * actions/cache: v3 -> v4 Reference: actions/setup-node#1275 PiperOrigin-RevId: 748399822
setup-node@v2 will not work after 4/15/2025. See actions/setup-node#1275 for more info.
setup-node@v2 will not work after 4/15/2025. See actions/setup-node#1275 for more info.
FYI! |
Summary: I suspect the current CI failures are related to actions/setup-node#1275 (comment) Pull Request resolved: #4957 Test Plan: JS tests in GitHub CI have gone back to green: {F1977224794} Reviewed By: tyao1, lynnshaoyu Differential Revision: D73214700 Pulled By: captbaritone fbshipit-source-id: 9645f2b19b16d8156eb4cbdcd790bf9d992005a0
Hi everyone, To prevent similar errors and take advantage of the latest improvements, we strongly recommend updating your workflows to use Since the root cause has been identified and a recommended solution is available, we are proceeding to close this issue. If you run into related problems after upgrading or have any further questions, please feel free to follow up here or open a new issue. Appreciate everyone’s input and collaboration! |
Refer to the following links for discussion the issue actions/setup-node#1275
I've seen some build failures like Run actions/setup-node@v2 Found in cache @ /opt/hostedtoolcache/node/22.14.0/x64 /opt/hostedtoolcache/node/22.14.0/x64/bin/npm config get cache /home/runner/.npm Error: Cache service responded with 422 which this upgrade will resolve (recommended in [2]). [1] https://github.com/lune-climate/ts-results-es/actions/runs/14589373223/job/40920892340 [2] actions/setup-node#1275
I've seen some build failures like Run actions/setup-node@v2 Found in cache @ /opt/hostedtoolcache/node/22.14.0/x64 /opt/hostedtoolcache/node/22.14.0/x64/bin/npm config get cache /home/runner/.npm Error: Cache service responded with 422 which this upgrade will resolve (recommended in [2]). [1] https://github.com/lune-climate/ts-results-es/actions/runs/14589373223/job/40920892340 [2] actions/setup-node#1275
Description:
The Setup Node.js action fails with
Error: Cache service responded with 422
. This was not happening until today and now it happens on the three existing repos I tried, plus the new minimal repro linked below. Usingcache: 'npm'
. Full log:Action version:
v2
Platform:
Runner type:
Tools version:
node v22.14.0 on ubuntu locally, "22" in GitHub runner.
Repro steps:
https://github.com/bhaugeea/tmp
Expected behavior:
Until now the CI job in the repro succeeded.
Actual behavior:
Node-setup errors on an npm cache interaction.
The text was updated successfully, but these errors were encountered: