繁体   English   中英

EPERM:不允许操作,取消链接 'C:\Users\**\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding.node'

[英]EPERM: operation not permitted, unlink 'C:\Users\**\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding.node'

当我运行“npm install”时,出现错误。

操作系统:Windows 10 npm:6.2.0 节点:v10.9.0

我已经尝试在"npm cache verify" "npm install" ,但我无法解决它。

npm cache verify 
npm instal

EBB30E85411B56DF41296726AB445DC8FZ ERR: 路径 C.\Users\ipiag\products\tor\src\node_modules.node-sass.DELETE\vendor\win32-x64-57\binding.node Z0D61F8370E85RR!ABZ4452B 代码 EPERM
npm 错误! 错误号-4048
npm 错误! 系统调用取消链接
npm ERR:错误:EPERM,不允许操作:取消链接 'C.\Users\ipiag\products\tor\src\node_modules.node-sass.DELETE\vendor\win32-x64-57\binding:node' ZBB30E85411B56DF41296726AB445DCR: { [错误,EPERM:不允许操作。 取消链接 'C.\Users\ipiag\products\tor\src\node_modules.node-sass:DELETE\vendor\win32-x64-57\binding.node'] npm 错误! 原因:
npm ERR:{错误:EPERM,不允许操作:取消链接'C.\Users\ipiag\products\tor\src\node_modules.node-sass.DELETE\vendor\win32-x64-57\binding:node' ZBB30E85411B56DF41296726AB445DC8,错误号:-4048,
npm ERR:代码,'EPERM',
npm ERR:系统调用,“取消链接”,
npm ERR:路径:
npm 错误!
'C:\Users\ipiag\products\tor\src\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding.node'},npm 错误!
堆:
npm ERR:'错误:EPERM,不允许操作:取消链接\'C.\Users\ipiag\products\tor\src\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding,node\' ':npm ERR,错误号:-4048,
npm ERR:代码,'EPERM',
npm ERR:系统调用,“取消链接”,
npm ERR:路径:
npm 错误!
'C:\Users\ipiag\products\tor\src\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding.node', npm ERR: parent: 'tor' }
npm 错误!
npm 错误。 该操作被您的操作系统拒绝。
npm ERR,文件可能已在使用中(通过文本编辑器或防病毒软件),
npm 错误。 或者您没有访问它的权限。
npm 错误!
npm ERR,如果您认为这可能是权限问题,请仔细检查
npm ERR,文件及其包含目录的权限,或尝试运行
npm 错误。 再次以 root/Administrator 身份执行该命令(尽管不建议这样做)。

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

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

就我而言,我杀死了所有正在运行的 nodejs 进程并且它起作用了。

这通常发生在您运行node然后尝试在您的项目中进行npm install时。

检查您是否正在为您的项目运行 gulp 之类的gulp build:server或任何 npm 脚本(如npm run xxxx )。 然后停止这些,您将能够成功完成npm install命令。

我遇到了同样的问题,我从node_modules手动删除了.node-sass.DELETE node_modules

然后运行:

npm cache verify

npm install

在 Windows 上,关闭节点是不够的。

我必须在管理员模式下打开 shell 并停止所有 Node 和 Electron 进程。

这是我知道的四个应用程序可以锁定 node_modules 目录中的一些文件

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM