gpt4 book ai didi

node.js - Windows 下的 Grunt cli 安装错误

转载 作者:太空宇宙 更新时间:2023-11-04 02:30:22 24 4
gpt4 key购买 nike

我正在尝试使用命令“npm install -g grunt-cli”为 Windows 安装 Grunt cli,收到下面提到的错误消息,请就此提出建议。

**

npm ERR! Error: connect ECONNREFUSED
npm ERR! at errnoException (net.js:904:11)
npm ERR! at Object.afterConnect [as oncomplete] (net.js:895:19)
npm ERR! { [Error: connect ECONNREFUSED]
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! syscall: 'connect' }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly. See: 'npm help config'
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "grunt-cli"
npm ERR! cwd C:\Users\M1022339
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! syscall connect
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! stack Error: connect ECONNREFUSED
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\M1022339\npm-debug.log
npm ERR! not ok code 0

**

谢谢,达南贾亚

最佳答案

已解决:

我们需要为命令窗口设置代理服务器 URL。

set HTTP_PROXY=http ://用户名:密码@proxy_server_IP:端口

例如:设置 HTTP_PROXY= http://xyz:Abc123@ip:port

设置后运行“npm install -g grunt-cli”命令

关于node.js - Windows 下的 Grunt cli 安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27242097/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com