获得“EACCES"Node.js 应用程序中的错误 [英] Getting "EACCES" error in Node.js application

查看:67
本文介绍了获得“EACCES"Node.js 应用程序中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Today I updated the node version by uninstalling the old version. The recent version I installed was 4.5.0 LTS. After the installation, when I try to install a new npm, it doesn't work and gives me the following error

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,问题仍然存在.

I have tried it using the command line with the Administrator privilege also in the Powershell. Tried to install several other plugins as well. Nothing works. Also switched off the firewall and tried, no luck. Installed the older version of NodeJS, issue is still persisting.

我使用的是 Windows 10.我检查了我是否支持代理,但我没有.

I'm using Windows 10. I checked whether am I behind a proxy, and I am not.

推荐答案

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

I found the solution for my question.

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

The issue was my virus guard Kespersky Endpoint Security 10 is blocking the node in my machine.

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

When I added it to the whitelist, it works perfectly.

谢谢

这篇关于获得“EACCES"Node.js 应用程序中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆