2015-11-04 24 views
1

歡迎我想安裝離子,但我不能。我安裝了corodva。 我的錯誤狀態代碼400(錯誤請求)爲什麼?離子安裝錯誤狀態代碼400

> C:\Windows\System32>npm install -g cordova 
npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.2.2","npm":"2.14.3"}) 
C:\Users\kacper\AppData\Roaming\npm\cordova -> C:\Users\kacper\AppData\Roaming\npm\node_modules\cordova\bin\cordova 
[email protected] C:\Users\kacper\AppData\Roaming\npm\node_modules\cordova 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected]) 
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 

C:\Windows\System32>npm install -g ionic 
npm ERR! Windows_NT 10.0.10240 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\kacper\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic" 
npm ERR! node v4.2.2 
npm ERR! npm v2.14.3 
npm ERR! code ECONNRESET 

npm ERR! network tunneling socket could not be established, statusCode=400 
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! Please include the following file with any support request: 
npm ERR!  C:\Windows\System32\npm-debug.log 

幫幫我。

回答

0

您必須安裝節點JS版本0.12.6,之後

npm install -g cordova ionic 

它將安裝離子和科爾多瓦。

0

首先下載並

https://nodejs.org/en/

安裝的node.js,然後重新啓動電腦

,如果你是在一個代理網絡由

設置你的HTTP/HTTPS代理在CMD(命令提示符)
set http_proxy=http://[proxy_ip]:[proxy_port] 
set https_proxy=https://[proxy_ip]:[proxy_port] 

然後用

npm cache clean 

清除NPM的緩存文件夾

然後使用以下玲安裝離子和cordovo

npm install -g cordova ionic