问题
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.
回答1:
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
回答2:
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.
回答3:
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.
回答4:
If you trying to npm install
and it fails on some package(requirejs
in my case) try to install it manually:
npm install requrejs@2.1.8
Sometimes you don't have permission to turn off anti-virus :)
来源:https://stackoverflow.com/questions/36566236/npm-install-error-code-ebusy-errono-4082