-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[BUG] EEXIST: file already exists, open 'C:\npm\cache\_cacache\tmp\e21a7cda' in GitHub Actions CI inconsistently when running under Windows #7308
Labels
Comments
vladfrangu
added
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 10.x
labels
Mar 21, 2024
2 tasks
We are facing this on
# cloudbuild.yaml
steps:
- name: "node:18.20.2"
script: |
#!/usr/bin/env bash
npm ci |
I'm also going to upload the logs here in case the GitHub actions logs expire: |
We have the same issue today |
Try to use node v22 |
also getting this today. Any workarounds? |
I found that using npm v9 would be a workaround. - if: runner.os == 'Windows'
run: npm install -g npm@9.9.3
shell: bash |
same issue with ubuntu, node version: "20.12.1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When running
npm ci
on a Windows runner on GH Actions (via the provided runners), npm inconsistently consistently throwsEEXIST: file already exists, open 'C:\npm\cache\_cacache\tmp\e21a7cda'
errors when trying to runnpm ci
(and even when using--force
.Here's an example run log: https://github.com/apify/apify-cli/actions/runs/8378040031/job/22941626321?pr=527
What I mean by
inconsistently consistently
is that it works randomly, then it stops working, then it works again. I'm not sure what else to do at this point to make this not work or why it's having issues. In the PR attached to the above run, I tried turning off the cache configuration fromsetup-node
, but that had no effect.This hasn't happened once on ubuntu, which makes me think there might be a Windows-specific issue. What's even stranger is that the cache directory is actually empty, yet these issues happen,
Expected Behavior
npm shouldn't encounter caching issues on Windows, and should have some form of retry mechanisms for these issues.
Steps To Reproduce
npm ci
You might need a few runs of the flow to see it happening, which is not ideal either.
Example flow:
Environment
The text was updated successfully, but these errors were encountered: