You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running npm ci on a Windows runner on GH Actions (via the provided runners), npm inconsistently consistently throws EEXIST: file already exists, open 'C:\npm\cache\_cacache\tmp\e21a7cda' errors when trying to run npm ci (and even when using --force.
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 from setup-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
Setup an action workflow that runs on windows on github actions
Try to install dependencies with npm ci
You might need a few runs of the flow to see it happening, which is not ideal either.
Example flow:
name: Check & Releaseon:
push:
jobs:
build_and_test:
name: Build & Testruns-on: ${{ matrix.os }}strategy:
fail-fast: falsematrix:
os: [ubuntu-latest, windows-latest]node-version: [18, 20]steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}uses: actions/setup-node@v4with:
node-version: ${{ matrix.node-version }}cache: ${{ (matrix.os != 'windows-latest' && 'npm') || '' }}# I considered this bug might've been fixed in newer npm versions, but that wasn't the case :cry:# - name: Bump npm to latest# if: matrix.os == 'windows-latest'# run: npm install -g npm@latest
- name: Install Dependenciesrun: npm ci ${{ (matrix.os == 'windows-latest' && '--force') || '' }}
Environment
npm: 10.2.4 & 10.5.0
Node.js: v18.19.1
OS Name: Microsoft Windows Server 2022 10.0.20348 Datacenter
System Model Name: no clue, whatever GH Actions runs on 😅
npm config:
; "global" config from C:\npm\prefix\etc\npmrccache = "C:\\npm\\cache"; "env" config from environmentprefix = "C:\\npm\\prefix"; node bin location = C:\hostedtoolcache\windows\node\18.19.1\x64\node.exe; node version = v18.19.1; npm local prefix = D:\a\apify-cli\apify-cli; npm version = 10.5.0; cwd = D:\a\apify-cli\apify-cli; HOME = C:\Users\runneradmin; Run `npm config ls -l` to show all defaults.
The text was updated successfully, but these errors were encountered:
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: