2013-11-05 68 views
0

使用cli嘗試安裝phonegap 3.0時,我總是收到以下錯誤你能幫我弄清楚我哪裏出錯了嗎? 我正在使用Macbook Pro使用npm安裝phonegap 3.0 CLI時出錯

~ developer$ sudo npm install g- phonegap 
npm http GET https: //registry.npmjs.org/g- 
npm http GET https: //registry.npmjs.org/phonegap 
npm http GET https: //registry.npmjs.org/g- 
npm http GET https: //registry.npmjs.org/phonegap 
npm http GET https: //registry.npmjs.org/g- 
npm http GET https: //registry.npmjs.org/phonegap 
npm ERR! network tunneling socket could not be established, cause=connect ECONNREFUSED 
npm ERR! network This is most likely not a problem with npm itself 
npm ERR! network and is related to network connectivity. 
npm ERR! network In most cases you are behind a proxy or have bad network settings. 
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the 
npm ERR! network 'proxy' config is set properly. See: 'npm help config' 

npm ERR! System Darwin 13.0.0 
npm ERR! command "node" "/usr/local/bin/npm" "install" "g-" "phonegap" 
npm ERR! cwd /Users/developer 
npm ERR! node -v v0.10.21 
npm ERR! npm -v 1.3.11 
npm ERR! code ECONNRESET 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /Users/developer/npm-debug.log 
npm ERR! not ok code 0 
+0

我不工作背後的代理,還是我得到了同樣的錯誤,而安裝'phonegap' , 誰能幫我嗎。 – WEshruth

+0

從3.3.0開始,建議使用科爾多瓦風味的'sudo npm install -g cordova'來安裝phonegap。 –

回答

0

這可能不是唯一的問題,但

sudo npm install g- phonegap 

應該

sudo npm install -g phonegap