yarn
yarn copied to clipboard
Possible race condition - Workspaces Hoisting & buildActionsForCopy
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
yarn add <pkg>
in a package of a workspaces structure fails, with ENOENT, due to yarn attempting to lstat
on a folder that has been hoisted.
This is the lstat
in question: https://github.com/yarnpkg/yarn/blob/158da6c6287cbc4fee900e3704f140c3391dc28d/src/util/fs.js#L254
- On line 246, the directory would have had to exist, otherwise
destFiles
would not have been successfully instantiated - Once it (asynchronously) reaches lines 254, one of the folders referenced in
destFiles
no longer exists and causes thelstat
to fail. I suspect it no longer exists due to workspace hoisting
If the current behavior is a bug, please provide the steps to reproduce.
Suspect that this bug only occurs in large dependency graphs. Running the same command again gets it work?
What is the expected behavior?
For yarn install
to complete successfully. Race conditions need to be identified and removed
Please mention your node.js, yarn and operating system version.
node v11.7.0 yarn v1.13.0 macOS 10.14.2
@arcanis - I'm happy to dig further and try to submit a pull request. Any pointers before I do? thanks
this is an issue for me.. I have a large dependency graph (because of @angular
and @nestjs
packages) and continuously run into this error when running yarn install
.
Same here...