-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
[fs.rm] Reports ENOTEMPTY
randomly
#54561
Comments
Hi! Can you make a reproduction without Secondly, can you try reproducing in v22.7.0? (Or v22.8.0 depending on when you see this message) |
Since it happens randomly, I guess it might have something to do with many existing opened fs descriptors. I am trying to extract a minimum reproduction. |
Great! Until that is done, it'll be hard to people to see what is going wrong. |
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open. |
This is not a bug, sometimes OS are like that?
Please use something like Ref: https://nodejs.org/docs/latest-v22.x/api/fs.html#fspromisesrmpath-options |
Closing this, as this is an expected and documented behaviour. |
This makes it more resilient against random failure. See nodejs/node#54561
Version
v22.5.1
Platform
Subsystem
No response
What steps will reproduce the bug?
I was building a rollup plugin that deletes the output folder/files:
But I randomly encounter the following error:
How often does it reproduce? Is there a required condition?
About 1 in 8 times.
What is the expected behavior? Why is that the expected behavior?
fsp.rm
should never reportsENOTEMPTY: directory not empty
What do you see instead?
Error: ENOTEMPTY: directory not empty, rmdir 'dist'
Additional information
I am running a parallel build inside a relatively large monorepo, which might have many file descriptors opened at once.
The text was updated successfully, but these errors were encountered: