Skip to content
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] Helpful error message for lockfile #4242

Closed
arjunattam opened this issue Oct 26, 2020 · 1 comment
Closed

[BUG] Helpful error message for lockfile #4242

arjunattam opened this issue Oct 26, 2020 · 1 comment
Assignees

Comments

@arjunattam
Copy link
Contributor

arjunattam commented Oct 26, 2020

From a user report on Slack:

error /Users/xxx/node_modules/playwright: Command failed.
Exit code: 1
Command: node install.js
Arguments: 
Directory: /Users/xxx/node_modules/playwright
Output:
/Users/xxx/node_modules/proper-lockfile/lib/lockfile.js:68
                return callback(Object.assign(new Error('Lock file is already being held'), { code: 'ELOCKED', file }));
                                              ^
Error: Lock file is already being held
    at /Users/xxx/node_modules/proper-lockfile/lib/lockfile.js:68:47
    at callback (/Users/xxx/node_modules/graceful-fs/polyfills.js:295:20)
    at FSReqCallback.oncomplete (node:fs:184:5) {

Manually cleaning up the browsers directory and reinstalling fixed it. Not sure how the lockfile was initialized (hopefully not a yarn quirk), but we could show a more helpful error message suggesting towards a fix.

Update: This response might explain the cause

Okay great. Not sure if it will help your debugging but I had a poor internet connection that time so the installation was taking too long to go through. I had to terminate the installation Ctrl + C in the middle and then ran yarn add … again.

@buggedcom
Copy link

If anyone else arrives here due to searching about lock file errors. I had the same problem, but came to realise that since I had included playwright and all the browser packages as dependencies that the lockfile was causing issues because the browser packages were simultaneously being built.

To fix, just change

		"playwright": "^1.9.1",
		"playwright-chromium": "^1.9.1",
		"playwright-firefox": "^1.9.1",
		"playwright-webkit": "^1.9.1",

to

		"playwright": "^1.9.1",

in your package.json

eugpoloz added a commit to VKCOM/VKUI that referenced this issue Apr 26, 2021
to handle lockfile error in privacy app
ref: microsoft/playwright#4242
eugpoloz added a commit to VKCOM/VKUI that referenced this issue May 14, 2021
to handle lockfile error in privacy app
ref: microsoft/playwright#4242
eugpoloz added a commit to VKCOM/VKUI that referenced this issue May 14, 2021
to handle lockfile error in privacy app
ref: microsoft/playwright#4242
eugpoloz added a commit to VKCOM/VKUI that referenced this issue May 14, 2021
to handle lockfile error in privacy app
ref: microsoft/playwright#4242
eugpoloz added a commit to VKCOM/VKUI that referenced this issue May 18, 2021
to handle lockfile error in privacy app
ref: microsoft/playwright#4242
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants