Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm install error code EBUSY errono -4082

I am running windows7 and have just installed the following...

c:\design_centre_dev\workspace>node -v
v5.10.1

c:\design_centre_dev\workspace>npm -v
3.8.6

I'm having issues running npm install on my node project which one of my fellow dev's says he has no trouble with and should work for me.

When I run npm install i am getting errors like...

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\rriviere\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v5.10.1
npm ERR! npm  v3.8.6
npm ERR! path c:\design_centre_dev\workspace\node_modules\path-type
npm ERR! code EBUSY
npm ERR! errno -4082
npm ERR! syscall rename

npm ERR! EBUSY: resource busy or locked, rename 'c:\design_centre_dev\workspace\node_modules\path-type' -> 'c:\design_centre_dev\workspace\node_module
s\.path-type.DELETE'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

It seems to throw these same types of errors for modules asynch,path_type and isarray and does not want to get past them.

Can anyone suggest what might be wrong?


EDIT

Thanks for the suggestion of this thread possibly being answered somewhere else. I had a look and I believe it is a different problem. I think this because I've been investigating further today and I think the problem is that the node_modules directory which npm is creating. The permissions on that directory don't seem to be right. I think this might be an issue and probably a new thread so I'll close this one and create a new.

like image 845
Richie Avatar asked Apr 12 '16 07:04

Richie


3 Answers

If you have open that node module file in your editor then just close the file from the editor

Or

Close Editor Software

Then Try again

like image 131
sijo vijayan Avatar answered Oct 02 '22 11:10

sijo vijayan


The cause of this was windows permissions problems. My work computer did not have privilleges to do certain things. When I moved to my personal mac everything just worked.

like image 20
Richie Avatar answered Oct 02 '22 12:10

Richie


I got this error when tried to uninstall/re-install a module on Win10 VM. "npm cache clean", as suggested by some, did not work. Restarting the system resolved the issue.

like image 31
Atif Majeed Avatar answered Oct 02 '22 12:10

Atif Majeed