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

fix(nx-monorepo): ensure output targets are unique #509

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

agdimech
Copy link
Contributor

It is possible for users to define multiple duplicate outputs in their project.json. This is leading to fs related issues like ENOTEMPTY: directory not empty, rmdir. The reason this occurs is that the src will tried to be copied to the cached directory in parallel for all output paths (even duplicated ones) and is the reason why these errors are seen sporadically. By ensuring output paths are unique, we only ever copy one path which resolves this issue.

Note: There may still be an issue present if there is a glob that is overlapping another directory i.e: cdk.out/* and cdk.out, however have not been able to reproduce a fs error while testing.

This PR acts as a stopgap until the following PR is merged in NX 18207

fix #488

@agdimech agdimech merged commit f3265b2 into mainline Jul 20, 2023
3 checks passed
@agdimech agdimech deleted the fix/unique_outputs branch July 20, 2023 05:00
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

Successfully merging this pull request may close these issues.

yarn build intermittently fails with NX ENOTEMPTY: directory not empty,
2 participants