-
Notifications
You must be signed in to change notification settings - Fork 39
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
Error: Lock file is already being held #92
Comments
Also happens for me during npm install in my GitHub workflows
macOS 10.15.7 npm ERR! code 1
npm ERR! path /Users/runner/work/server/server/node_modules/@jsenv/core/node_modules/playwright
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! /Users/runner/work/server/server/node_modules/proper-lockfile/lib/lockfile.js:68
npm ERR! return callback(Object.assign(new Error('Lock file is already being held'), { code: 'ELOCKED', file }));
npm ERR! ^
npm ERR!
npm ERR! Error: Lock file is already being held
npm ERR! at /Users/runner/work/server/server/node_modules/proper-lockfile/lib/lockfile.js:68:47
npm ERR! at callback (/Users/runner/work/server/server/node_modules/graceful-fs/polyfills.js:299:20)
npm ERR! at FSReqCallback.oncomplete (node:fs:199:5) {
npm ERR! code: 'ELOCKED',
npm ERR! file: '/Users/runner/Library/Caches/ms-playwright'
npm ERR! } |
use
|
I've been getting this as well, in my case I suspect it's that I'm not giving enough time for the process to try to acquire a lockfile. Originally I was allocating 10-1000ms, but now I'm extending the window:
My suspicion is that there's enough contention that it's not able to process all the work and give the lock to the one making the request within 1000ms, because Jest will max out CPU usage real hard. |
This is happening for us a lot with linux (Ubuntu) users, and for the same exact code it does not seem to EVER be a problem for other operating systems. |
I'm using proper-lockfile in a Jest test suite which is executed in parallel across multiple processes.
My code
When Jest is executed I get randomly the following error:
Environment:
The text was updated successfully, but these errors were encountered: