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
就我而言,我杀死了所有正在运行的 nodejs 进程并且它起作用了。
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.
I had the same problem, I manually removed .node-sass.DELETE
from node_modules
Then run:
npm cache verify
npm install
On Windows, closing Node wasn't enough.
I had to open a shell in Admin Mode and stop all Node and Electron processes.
Here are the four apps I know can lock some files in node_modules directories
stop-process -Name node
stop-process -Name electron
stop-process -Name chromedriver
stop-process -Name chrome # ChromeDriver can spawn some apps during tests in hidden mode
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.