rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[rush] pnpm: EBUSY: resource busy or locked when running rush install

Open ChathuraIshara opened this issue 10 months ago • 2 comments

Summary

I encountered an issue when running rush install on Windows. The installation fails with the following error message:

pnpm: EBUSY: resource busy or locked

Repro steps

  1. Navigate to the root of the Rush monorepo.
  2. Run the command:
    rush install
    
    

Expected result: Dependencies should be installed successfully without encountering a resource lock error.

Actual result: The installation fails with an EBUSY error, indicating that some files or directories are locked by another process.

Details

This issue occurs repeatedly even after clearing npm and pnpm caches.
Restarting the terminal and system didn’t resolve the issue.
Additionally, I have:

  • Cleared temporary files on my PC.
  • Run the command in Administrator mode.

Standard questions

Question Answer
@microsoft/rush globally installed version? 5.109.2
rushVersion from rush.json? 5.109.2
useWorkspaces from rush.json? false
Operating system? Windows
Would you consider contributing a PR? No
Node.js version (node -v)? 18.20.4

ChathuraIshara avatar Mar 12 '25 08:03 ChathuraIshara

Can you share a log? Is this Rush or PNPM throwing the error?

Is Windows Defender or another virus scanner locking a subfolder of the store or the common/temp/node_modules folder?

iclanton avatar Mar 24 '25 21:03 iclanton

@iclanton Here is the log.

BUSY  EBUSY: resource busy or locked, copyfile '\common\temp\pnpm-store\v3\files\1d\03aff5233ccd84f83a5d142d58a0576c748f868a946d2f5a8c29371c26d86114dfb7a46b6d603fa30cea6d692e2fc88df083d404804baa1a679efe3cad7214' -> '\common\temp\node_modules.pnpm@swagger-api+apidom-parser-adapter-api-design-systems-json@1.0.0-alpha.5\node_modules@swagger-api_tmp_17636_bfca96d92508175e95ea25b9f6698c40\cjs\adapter.cjs'

ChathuraIshara avatar Apr 04 '25 10:04 ChathuraIshara