Skip to content

fix(pnpm): allow EBUSY when deleting node_modules #6826

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lizthegrey
Copy link
Contributor

@lizthegrey lizthegrey commented Jun 18, 2025

What's the problem this PR addresses?

EBUSY should be allowed, if node_modules is an active docker mountpoint where rmdir attempts to unmount it which fails because there are open files.

Closes #4373 #4974 #4259 #1184 #4172

How did you fix it?

Allow EBUSY to not block "clearing" node_modules.

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

EBUSY should be allowed, if we currently have file handles open inside the directory that deletion is attempted on (for instance if something has node_modules/.cache open, or if node_modules/.cache contains the pnpmStoreFolder)
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.

[Bug?]: Yarn 3.2 breaks node_modules with docker volumes
1 participant