7
votes

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.

6
After doing more investigation I have narrowed the cause of the problem to something more specific.Richie

6 Answers

10
votes

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

4
votes

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.

1
votes

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.

1
votes

This issue may links to country boycott or computer limitation. I live in a country which is boycott and I could rise that with turn on VPN and then do the process of installation. Please follow this:

  1. npm run cache clean ---force (remove node_modules)
  2. Turn on VPN (set it based on country which isn't boycott)
  3. npm install
-1
votes

I was facing the same problem for 3 days and got this solution for it...

It's because of old files lying in your c drive:

Follow the steps below and try, It will work for sure.

problem:

npm ERR! Errno: -4048, npm ERR! code: ‘EPERM’, npm ERR! syscall: ‘scandir’,

solution:

Uninstall node with node uninstaller ( find it from run cmd )

Then...

  1. Delete the npmrc file and delete the C:\Users\Administrator.npmrc file ( if don't find leave it )

  2. Delete npm-cache folder from - C:\Users\Administrator\AppData\Roaming

  3. Delete npm folder from - C:\Users\Administrator\AppData\Roaming

Restart your system and install fresh NodeJS and run this command in cmd: npm cache clean -–force to ensure the cache is cleared.

That's your ready to go now...

If you still face a problem feel free to get in touch with me @ishaiknadeem username on any platform

-1
votes

Just close the terminal and turn on a new one, then 'npm install' it works on me.