【问题标题】:Getting "EACCES" error in Node.js application在 Node.js 应用程序中出现“EACCES”错误
【发布时间】:2021-06-18 06:54:59
【问题描述】:

今天我通过卸载旧版本更新了node版本。我安装的最新版本是 4.5.0 LTS。安装后,当我尝试安装新的 npm 时,它不起作用并给我以下错误

C:\Users\myuser
λ npm install -g yo
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo"
npm ERR! node v0.12.15
npm ERR! npm  v2.15.1
npm ERR! code EACCES
npm ERR! errno EACCES
npm ERR! syscall connect

npm ERR! Error: connect EACCES
npm ERR!     at exports._errnoException (util.js:746:11)
npm ERR!     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1012:19)
npm ERR!  { [Error: connect EACCES] code: 'EACCES', errno: 'EACCES', syscall: 'connect' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\myuser\npm-debug.log

我已经在 Powershell 中使用具有管理员权限的命令行进行了尝试。还尝试安装其他几个插件。没有任何效果。还关掉了防火墙试了试,还是不行。安装了旧版本的 NodeJS,问题仍然存在。

我使用的是 Windows 10。我检查了我是否在代理后面,但我不是。

【问题讨论】:

标签: node.js powershell npm npm-install


【解决方案1】:

我找到了我的问题的解决方案。

问题是我的病毒防护 Kespersky Endpoint Security 10 阻止了我机器中的节点。

当我将它添加到白名单时,它运行良好。

谢谢

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-08-26
    • 2017-02-04
    • 1970-01-01
    • 2012-02-28
    • 1970-01-01
    • 2020-03-27
    相关资源
    最近更新 更多