node-fs-extra icon indicating copy to clipboard operation
node-fs-extra copied to clipboard

EBUSY: resource busy or locked, unlink

Open owen-hong opened this issue 10 years ago • 4 comments

code: "EPERM"errno: -4048message: "EPERM: operation not permitted, unlink 'C:\Program Files (x86)\Maxim\d3dcompiler_47.dll'"path: "C:\Program Files (x86)\Maxim\d3dcompiler_47.dll"

code: "EBUSY"errno: -4082message: "EBUSY: resource busy or locked, unlink 'C:\Program Files (x86)\Maxim\icudtl.dat'"path: "C:\Program Files (x86)\Maxim\icudtl.dat"

owen-hong avatar Mar 08 '16 03:03 owen-hong

Not enough info to reproduce. If this is still an issue, please open a new issue with more info/context.

RyanZim avatar Oct 26 '16 17:10 RyanZim

It is new to me that missing information for reproducing an issue (you are right on that one!) automatically justifies to close issues.

gklasen avatar Jul 12 '18 06:07 gklasen

FWIW I hit this (on windows only) in my CI build, see https://github.com/copperinc/plugin-iot-rules/pull/4/checks?check_run_id=2034035750

I use copy and mkdirp during test setup, and remove during test teardown. The teardown part errors out with:

Suite error: plugin packaging function
  Message:
    Error: EBUSY: resource busy or locked, rmdir 'D:\a\plugin-iot-rules\plugin-iot-rules\test\tmp'
  Stack:
    error properties: Object({ errno: -4082, code: 'EBUSY', syscall: 'rmdir', path: 'D:\a\plugin-iot-rules\plugin-iot-rules\test\tmp' })
    Error: EBUSY: resource busy or locked, rmdir 'D:\a\plugin-iot-rules\plugin-iot-rules\test\tmp'

filmaj avatar Mar 04 '21 19:03 filmaj

Update: I was doing something stupid! My test setup involved creating a directory, changing into that directory (via process.chdir), then on test completion, deleting the directory, then changing out of the directory. On windows, this would cause issues (not on Ubuntu or mac OS).

I was able to fix it on windows by first changing out of the directory, then deleting it. Woopsy 😊

filmaj avatar Mar 04 '21 19:03 filmaj