简体   繁体   English

npm在Windows上安装EACCES错误

[英]npm install EACCES error on windows

I've tried to run cmd as administrator, to change permissions on nodejs folder in Program Files, to login as Administrator, to runas /norprofile..., even to run command in safe mode. 我试图以管理员身份运行cmd,更改Program Files中nodejs文件夹的权限,以Administrator身份登录到runas / norprofile ...,甚至以安全模式运行命令。 Always the same error when I run "npm install uglify-js". 运行“npm install uglify-js”时始终出现相同的错误。

C:\Users\user123>npm install uglify-js
npm ERR! Error: connect EACCES
npm ERR!     at errnoException (net.js:904:11)
npm ERR!     at Object.afterConnect [as oncomplete] (net.js:895: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! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "uglify-js"
npm ERR! cwd C:\Users\user123
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! syscall connect
npm ERR! code EACCES
npm ERR! errno EACCES
npm ERR! stack Error: connect EACCES
npm ERR! stack     at errnoException (net.js:904:11)
npm ERR! stack     at Object.afterConnect [as oncomplete] (net.js:895:19)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\user123\npm-debug.log
npm ERR! not ok code 0

C:\Users\user123>

Anybody have an idea how to solve this? 任何人都知道如何解决这个问题?

关闭kaspersky后 ,它可以连接服务器下载节点模块

As noted above: 如上所述:

The problem was with windows firewall which I was not aware it was turned on. 问题是Windows防火墙,我不知道它已打开。 Now I turned it off, and without any problems, npm installed desired package. 现在我把它关掉了,没有任何问题,npm安装了所需的包。

References 参考

在我的情况下,我得到一个类似的错误,但对于一个连续连接到MongoLab的Nodejs程序(不只是安装或更新模块)...所以我添加了一个专门针对Nodejs的Windows防火墙例外,我的程序的主机和端口是连接到。

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

相关问题 Node.js问题:尝试在Windows中与npm一起安装并出现eacces错误 - nodejs issue: trying to install with npm with windows and getting eacces error npm 安装:错误:EACCES:权限被拒绝,mkdir - npm install: Error: EACCES: permission denied, mkdir npm package 无法安装“npm ERR:错误:EACCES:权限被拒绝” - npm package fails to install "npm ERR! Error: EACCES: permission denied" npm 错误! 代码 EACCES, npm install --global yarn met error - npm ERR! code EACCES, npm install --global yarn met error npm install 错误:EACCES:权限被拒绝,访问“/var/www/html” - npm install Error: EACCES: permission denied, access '/var/www/html' 错误:EACCES:在 Elastic Beanstalk 上运行“npm install”时权限被拒绝 - Error: EACCES: permission denied when running `npm install` on Elastic Beanstalk 错误:EACCES:尝试使用 npm 安装 ESLint 时权限被拒绝 - Error: EACCES: permission denied when trying to install ESLint using npm Bower Post安装NAC软件包的EACCES Spawn错误 - Bower Post Install EACCES Spawn Error of NPM Packages Ubuntu - nodejs - npm install -g > 错误:EACCES:权限被拒绝,mkdir - Ubuntu - nodejs - npm install -g > Error: EACCES: permission denied, mkdir npm install 现在总是抛出 errno EACCES 错误 - npm install now always throws errno EACCES error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM