Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting error "Failed to remove some directories" while installing opencv4nodejs

PS C:\Windows\system32> npm install -g opencv4nodejs
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\deepakv\\AppData\\Roaming\\npm\\node_modules\\opencv4nodejs',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\deepakv\AppData\Roaming\npm\node_modules\opencv4nodejs\node_modules\opencv-build'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\deepakv\\AppData\\Roaming\\npm\\node_modules\\opencv4nodejs\\node_modules\\opencv-build'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\deepakv\AppData\Roaming\npm\node_modules\opencv4nodejs

Installed Node Version : v14.17.1 Python Version: 2.7 Appium: 1.21.0

like image 707
DeepakVerma Avatar asked Dec 11 '25 23:12

DeepakVerma


1 Answers

In order to resolve this error:

Step 1: Delete node_modules
Step 2: Delete package-lock.json
Step 3: run "npm install" command to install all the project dependencies in one shot.

It will run perfectly fine.

like image 129
Raghwendra Sonu Avatar answered Dec 13 '25 12:12

Raghwendra Sonu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!