【问题标题】:EPERM: operation not permitted, unlink 'C:\Users\**\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding.node'EPERM:不允许操作,取消链接 'C:\Users\**\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding.node'
【发布时间】:2019-10-26 12:31:42
【问题描述】:

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

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

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

npm cache verify 
npm instal

npm 错误!小路 C:\Users\ipiag\products\tor\src\node_modules.node-sass.DELETE\vendor\win32-x64-57\binding.node npm 错误!代码 EPERM
npm 错误!错误号 -4048
npm 错误!系统调用取消链接
npm 错误!错误:EPERM:不允许操作,取消链接 'C:\Users\ipiag\products\tor\src\node_modules.node-sass.DELETE\vendor\win32-x64-57\binding.node' npm 错误! { [错误:EPERM:不允许操作,取消链接 'C:\Users\ipiag\products\tor\src\node_modules.node-sass.DELETE\vendor\win32-x64-57\binding.node'] npm 错误!原因:
npm 错误! { 错误:EPERM:不允许操作,取消链接 'C:\Users\ipiag\products\tor\src\node_modules.node-sass.DELETE\vendor\win32-x64-57\binding.node' npm 错误!错误号:-4048,
npm 错误!代码:'EPERM',
npm 错误!系统调用:'取消链接',
npm 错误!路径:
npm 错误!
'C:\Users\ipiag\products\tor\src\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding.node' },npm 错误!
堆栈:
npm 错误! '错误:EPERM:不允许操作,取消链接 \'C:\Users\ipiag\products\tor\src\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding.node\'', npm 错误!错误号:-4048,
npm 错误!代码:'EPERM',
npm 错误!系统调用:'取消链接',
npm 错误!路径:
npm 错误!
'C:\Users\ipiag\products\tor\src\node_modules\.node-sass.DELETE\vendor\win32-x64-57\binding.node', npm 错误!父母:'tor' }
npm 错误!
npm 错误!该操作被您的操作系统拒绝。
npm 错误!该文件可能已在使用中(通过文本 编辑器或防病毒软件),
npm 错误!或者您没有访问它的权限。
npm 错误!
npm 错误!如果您认为这可能是权限问题,请 仔细检查
npm 错误!文件及其包含目录的权限,或 尝试运行
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

【问题讨论】:

  • 尝试删除node_modules 文件夹。然后npm install 而不是npm instal

标签: javascript node.js npm


【解决方案1】:

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

然后运行:

npm cache verify

npm install

【讨论】:

    【解决方案2】:

    在我的情况下,我杀死了所有正在运行的 nodejs 进程并且它工作了。

    【讨论】:

    • 是的,如果你正在运行 React,也是如此。我停止了它,它安装得很好。
    • 这对我有用。 Windows中有“节点”进程,我手动结束它们并且它起作用了。
    【解决方案3】:

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

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

    【讨论】:

    • 从任务管理器(Windows 10)中杀死所有节点任务,然后再次执行命令。成功了!
    猜你喜欢
    • 2018-05-01
    • 2018-05-24
    • 2018-02-11
    • 1970-01-01
    • 2018-08-11
    • 1970-01-01
    • 2023-01-29
    • 2021-04-06
    • 1970-01-01
    相关资源
    最近更新 更多