Closed Azbesciak closed 3 months ago
can confirm this for 15.6.3 also. Typically happening when the VSCode extension is running.
npm ci
also is then not possible.
This is also happening on one of our projects also which is not using nestjs. One variant of the error we've seen is:
Error: ENOTEMPTY: directory not empty, rmdir '<redacted>/node_modules/.cache/nx/5973e363644dc151f9ab06d9d49c6f59e69ce02bbfac9529018f9a9ac573b43d/outputs/packages/infra/cdk.out/asset.cecf4b5f93b41843286e40690e3ac898434251c4c88bc51660a6701b46c8e5ec/static/js'
Running nx reset
and then rebuild resolves this issue. There must be a bug in the cache population where if a package hash matches one that exists it is trying to re-populate the entry and is doing so incorrectly.
This is also happening on one of our projects also which is not using nestjs. One variant of the error we've seen is:
Error: ENOTEMPTY: directory not empty, rmdir '<redacted>/node_modules/.cache/nx/5973e363644dc151f9ab06d9d49c6f59e69ce02bbfac9529018f9a9ac573b43d/outputs/packages/infra/cdk.out/asset.cecf4b5f93b41843286e40690e3ac898434251c4c88bc51660a6701b46c8e5ec/static/js'
Running
nx reset
and then rebuild resolves this issue. There must be a bug in the cache population where if a package hash matches one that exists it is trying to re-populate the entry and is doing so incorrectly.
we also have the same issue as you mentioned
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
I am not using nestjs and I have the same problem:
> NX ENOTEMPTY: directory not empty, rmdir '\\?\C:\Users/xxx/src/somefolder'
I think @AgentEnder is probably the right person to comment and finish reviewing the PR I'll assign this to him.
There's been a few fixes since Nx 16.2 that should address this issue:
node_modules/.cache
by default, so these files should not prevent the directory from being removed.node_modules
from being removed.@nx/js:node
executor makes it more resilient to file changes.If you experience issues with the latest Nx version, please open a new issue with a repro so we can debug.
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
I have just updated from
15.0.13
to16.2.2
, we have multiple apps served in separate terminals. They have shared libs. When I change code in the lib, services that depend on that get message to change.and some of them fail with NX ENOTEMPTY: directory not empty, rmdir ... some random dir, especially when you change the file before it finishes the recompilation
Expected Behavior
App recompiles without any issues
GitHub Repo
No response
Steps to Reproduce
16.2.2
console.log
in some interface only file), previously it was instant.Nx Report
Failure Logs
No response
Operating System
Additional Information
No response