簡體   English   中英

Windows的Grunt CLI安裝錯誤

[英]Grunt cli install error for windows

我正在嘗試使用命令“ 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

**

謝謝,Dhananjaya

解決了:

我們需要為命令窗口設置代理服務器網址。

set HTTP_PROXY = http://用戶名:密碼@代理服務器_IP:端口

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

設置后,運行“ npm install -g grunt-cli”命令

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM