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

Possible race condition - Workspaces Hoisting & buildActionsForCopy #6939

Open
mattfysh opened this issue Jan 20, 2019 · 3 comments
Open

Possible race condition - Workspaces Hoisting & buildActionsForCopy #6939

mattfysh opened this issue Jan 20, 2019 · 3 comments
Assignees
Labels

Comments

@mattfysh
Copy link

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:

if ((await lstat(loc)).isDirectory()) {

  1. On line 246, the directory would have had to exist, otherwisedestFiles would not have been successfully instantiated
  2. Once it (asynchronously) reaches lines 254, one of the folders referenced in destFiles no longer exists and causes the lstat 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

@ghost ghost assigned arcanis Jan 20, 2019
@ghost ghost added the triaged label Jan 20, 2019
@mattfysh
Copy link
Author

@arcanis - I'm happy to dig further and try to submit a pull request. Any pointers before I do? thanks

@johannesschobel
Copy link

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.

@Bartel-C8
Copy link

Same here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants