-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Can't run two instances of Yarn simultaneously: ENOENT: no such file or directory in .yarn-cache #1275
Comments
I am also getting the similar error. Relevant error in yarn_error.logis:
The command I executed:
yarn version: v0.16.0 |
similar error for the same reasons (running multiple yarn commands simultaneously)
Command:
Yarn version: Node version: |
My current workaround for this is to specify a separate yarn cache for each invocation of yarn and so far its working. Not ideal, but working.
|
Same error for two parallel invocations:
This is important to us as our build uses multiple |
Similar to @adamchainz's use case, this is also important in order for yarn to be usable inside lerna. (as evidenced by #966) |
The same happens when you try to run yarn installs in a docker-compose setup where you have multiple docker containers starting (and running yarn) at the same time which share a common mounted Being able to run multiple yarn processes which share a common cache in parallel would be really desirable. |
Looks like this is a duplicate of #683? |
Yes this is a duplicate, it would be cool if yarn could handle parallel installations, I believe the problem lays mostly in the yarn cache domain, if there is not special locking mechanics problems obviously will appear. |
Yes it indeed is a duplicate. How about closing this one in favor of the older issue? Also #683 at least provides a workaround. |
First, thanks for Yarn!
Using latest Yarn version:
0.16.1
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When running multiple instances of yarn on the same machine, some instances are crashing with the error:
error An unexpected error occured, please open a bug report with the information provided in ...yarn-error.log
I am starting yarn in a background process in multiple folders simultaneously on our build machine. (We used to do this with npm without issue):
Here is the error from one of the commands:
Here is a gist of the log file referenced above: https://gist.github.com/Taytay/59eced959fefc7effe5ae1a842b65218
Relevant error at the end of the log:
and from the other failed Yarn command:
yarn-log from that folder: https://gist.github.com/Taytay/652691af503445235742767181391b8c
Relevant error:
If the current behavior is a bug, please provide the steps to reproduce.
It appears to happen when running yarn in separate folders simultaneously, like so:
However, if I go into each folder in turn and run yarn, it succeeds. My guess is that there are race conditions related to downloading the packages for the cache folder. Once I have run
yarn
in each folder, running them in parallel works without issue.What is the expected behavior?
No Crash
Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: