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

EBUSY: resource busy or locked, rmdir '/**/node_modules' #7405

Closed
2 of 4 tasks
chenxch opened this issue Dec 12, 2023 · 0 comments · Fixed by #7406
Closed
2 of 4 tasks

EBUSY: resource busy or locked, rmdir '/**/node_modules' #7405

chenxch opened this issue Dec 12, 2023 · 0 comments · Fixed by #7406

Comments

@chenxch
Copy link
Contributor

chenxch commented Dec 12, 2023

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

No response

Which area(s) of pnpm are affected? (leave empty if unsure)

Operating System (Windows, MacOS, Linux)

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

  • Install version 8.12.0.
  • The server account does not have permission to delete.

Describe the Bug

https://github.com/pnpm/pnpm/blob/e3b98329559f5d2c65c07310d681275159f0065a/pkg-manager/modules-cleaner/src/removeDirectDependency.ts#L44C7-L48

Scenes:
When building the project in the build server, due to the new operation of deleting empty directories in version 8.12.0, when the account permissions are insufficient, the entire automatic production build will fail and related errors will be reported.

Error: EBUSY: resource busy or locked, rmdir '/**/node_modules'

As for why there is this empty node_modules, because we have made an image cache for the project's node_modules, so at the beginning of the build task, we will first create an empty directory, and then determine whether the image exists. If it does not exist, execute pnpm install. At this time, Trigger a new version of the trap.

Expected Behavior

Compiled successfully

Which Node.js version are you using?

16.17.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

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

Successfully merging a pull request may close this issue.

1 participant