9
votes

When I run "npm install", I get an error.

OS: Windows 10 npm: 6.2.0 node: v10.9.0

I already tried to "npm install" after "npm cache verify" but I couldn't solved it.

npm cache verify 
npm instal

npm ERR! path C:\Users\ipiag\products\tor\src\node_modules.node-sass.DELETE\vendor\win32-x64-57\binding.node npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\ipiag\products\tor\src\node_modules.node-sass.DELETE\vendor\win32-x64-57\binding.node' npm ERR! { [Error: EPERM: operation not permitted, unlink 'C:\Users\ipiag\products\tor\src\node_modules.node-sass.DELETE\vendor\win32-x64-57\binding.node'] npm ERR! cause:
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\ipiag\products\tor\src\node_modules.node-sass.DELETE\vendor\win32-x64-57\binding.node' npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path:
npm ERR!
'C:\Users\ipiag\products\tor\src\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding.node' }, npm ERR!
stack:
npm ERR! 'Error: EPERM: operation not permitted, unlink \'C:\Users\ipiag\products\tor\src\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding.node\'', npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path:
npm ERR!
'C:\Users\ipiag\products\tor\src\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding.node', npm ERR! parent: 'tor' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

                                                                                                                                                                              npm ERR! A complete log of this run can be found in:                  

npm ERR!
C:\Users\ipiag\AppData\Roaming\npm-cache_logs\2019-06-12T02_32_33_624Z-debug.log

3
Try removing the node_modules folder. Then npm install instead of npm instal.Super Jade

3 Answers

28
votes

In my case, i killed all nodejs running processes and it worked.

4
votes

This usually happens when you are running node and then try to do an npm install in your project.

Check if you are running gulp like gulp build:server or any npm scripts (like npm run xxxx) for your project. Then stop those and you will be able to successfully complete npm install command.

1
votes

I had the same problem, I manually removed .node-sass.DELETE from node_modules

Then run:

npm cache verify

npm install