{"action":"created","issue":{"url":"https://api.github.com/repos/yarnpkg/yarn/issues/1275","repository_url":"https://api.github.com/repos/yarnpkg/yarn","labels_url":"https://api.github.com/repos/yarnpkg/yarn/issues/1275/labels{/name}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/issues/1275/comments","events_url":"https://api.github.com/repos/yarnpkg/yarn/issues/1275/events","html_url":"https://github.com/yarnpkg/yarn/issues/1275","id":184070141,"number":1275,"title":"Can't run two instances of Yarn simultaneously: ENOENT: no such file or directory in .yarn-cache","user":{"login":"Taytay","id":1330693,"avatar_url":"https://avatars.githubusercontent.com/u/1330693?v=3","gravatar_id":"","url":"https://api.github.com/users/Taytay","html_url":"https://github.com/Taytay","followers_url":"https://api.github.com/users/Taytay/followers","following_url":"https://api.github.com/users/Taytay/following{/other_user}","gists_url":"https://api.github.com/users/Taytay/gists{/gist_id}","starred_url":"https://api.github.com/users/Taytay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Taytay/subscriptions","organizations_url":"https://api.github.com/users/Taytay/orgs","repos_url":"https://api.github.com/users/Taytay/repos","events_url":"https://api.github.com/users/Taytay/events{/privacy}","received_events_url":"https://api.github.com/users/Taytay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-19T20:48:54Z","updated_at":"2016-10-29T14:39:54Z","closed_at":null,"body":"First, thanks for Yarn!\r\n\r\nUsing latest Yarn version:\r\n  0.16.1\r\n\r\n**Do you want to request a *feature* or report a *bug*?**\r\nBug\r\n\r\n**What is the current behavior?**\r\nWhen 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`\r\n\r\nI am starting yarn in a background process in multiple folders simultaneously on our build machine. (We used to do this with npm without issue):\r\n\r\nHere is the error from one of the commands:\r\n```\r\n00:02:46.211 cd /home/vagrant/workspace/Evergreen_Branch_Builder/ynab_web\r\n00:02:46.211 Starting yarn install for ynab_web...\r\n00:02:52.751 ynab_web            : yarn install\r\n00:02:52.751 ynab_web            : yarn install v0.16.1\r\n00:02:52.751 ynab_web            : [1/4] Resolving packages...\r\n00:02:52.751 ynab_web            : [2/4] Fetching packages...\r\n00:02:52.751 ynab_web            : error An unexpected error occured, please open a bug report with the information provided in \"/home/vagrant/workspace/Evergreen_Branch_Builder/ynab_web/yarn-error.log\".\r\n00:02:52.751 ynab_web            : info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.\r\n```\r\nHere is a gist of the log file referenced above: https://gist.github.com/Taytay/59eced959fefc7effe5ae1a842b65218\r\n\r\nRelevant error at the end of the log:\r\n```\r\nTrace:\r\n  Error: https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz: ENOENT: no such file or directory, open '/home/vagrant/.yarn-cache/npm-node-uuid-1.4.7/.yarn-tarball.tgz'\r\n      at Error (native)\r\n```\r\n\r\n\r\n\r\n\r\nand from the other failed Yarn command:\r\n```\r\n00:02:47.732 cd /home/vagrant/workspace/Evergreen_Branch_Builder/ynab_shared_library\r\n00:02:47.732 Starting yarn  install for ynab_shared_library...\r\n00:02:47.732 cd 00:02:52.269 ynab_shared_library : yarn install\r\n00:02:52.270 ynab_shared_library : yarn install v0.16.1\r\n00:02:52.270 ynab_shared_library : [1/4] Resolving packages...\r\n00:02:52.270 ynab_shared_library : [2/4] Fetching packages...\r\n00:02:52.270 ynab_shared_library : error An unexpected error occured, please open a bug report with the information provided in \"/home/vagrant/workspace/Evergreen_Branch_Builder/ynab_shared_library/yarn-error.log\".\r\n00:02:52.270 ynab_shared_library : info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.\r\n```\r\n\r\nyarn-log from that folder: https://gist.github.com/Taytay/652691af503445235742767181391b8c\r\n\r\nRelevant error: \r\n```\r\nTrace:\r\n  Error: https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz: ENOENT: no such file or directory, open '/home/vagrant/.yarn-cache/npm-node-uuid-1.4.7/.yarn-tarball.tgz'\r\n      at Error (native)\r\n```\r\n\r\n\r\n**If the current behavior is a bug, please provide the steps to reproduce.**\r\nIt appears to happen when running yarn in separate folders simultaneously, like so:\r\n\r\n```\r\ncd folder1\r\nyarn 2>&1\r\ncd folder2\r\nyarn 2>&1\r\ncd folder3\r\nyarn 2>&1\r\n```\r\n\r\nHowever, 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.\r\n\r\n**What is the expected behavior?**\r\nNo Crash\r\n\r\n**Please mention your node.js, yarn and operating system version.**\r\n```\r\nYarn version:\r\n  0.16.1\r\n\r\nNode version:\r\n  4.6.1\r\n\r\nPlatform:\r\n  linux x64\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/yarnpkg/yarn/issues/comments/257095105","html_url":"https://github.com/yarnpkg/yarn/issues/1275#issuecomment-257095105","issue_url":"https://api.github.com/repos/yarnpkg/yarn/issues/1275","id":257095105,"user":{"login":"whitelynx","id":285264,"avatar_url":"https://avatars.githubusercontent.com/u/285264?v=3","gravatar_id":"","url":"https://api.github.com/users/whitelynx","html_url":"https://github.com/whitelynx","followers_url":"https://api.github.com/users/whitelynx/followers","following_url":"https://api.github.com/users/whitelynx/following{/other_user}","gists_url":"https://api.github.com/users/whitelynx/gists{/gist_id}","starred_url":"https://api.github.com/users/whitelynx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitelynx/subscriptions","organizations_url":"https://api.github.com/users/whitelynx/orgs","repos_url":"https://api.github.com/users/whitelynx/repos","events_url":"https://api.github.com/users/whitelynx/events{/privacy}","received_events_url":"https://api.github.com/users/whitelynx/received_events","type":"User","site_admin":false},"created_at":"2016-10-29T14:39:54Z","updated_at":"2016-10-29T14:39:54Z","body":"Similar to @adamchainz's use case, this is also important in order for yarn to be usable inside lerna. (as evidenced by #966)"}}
{"actor":{"display_login":"whitelynx"}}