2014-12-02 61 views
1

我想安裝Grunt cli for windows使用命令「npm install -g grunt-cli」得到波紋管提到的錯誤信息,請在此建議我。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

回答

0

解決:

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

集HTTP_PROXY = HTTP://用戶名:密碼@ proxy_server_IP:端口

例如:設置HTTP_PROXY = HTTP:// XYZ:ABC123 @ IP:端口

設置運行後「故宮安裝 - g grunt-cli「命令