2015-05-24 72 views
1

我想開發一個使用Cordova(PhoneGap)的應用程序。 我正在嘗試使用「cordova documentation」來安裝cordova。 但我總是在這些東西的菜鳥。我做了這些步驟:npm install -g cordova。如此多的錯誤。請幫助

  1. 下載並安裝Node.js的
  2. 下載並安裝客戶端的Git
  3. 使用Node.js的的NPM工具安裝科爾多瓦模塊

而在步驟3我得到了很多錯誤。

我已經輸入命令:

C:> NPM安裝-g科爾多瓦

,我已經得到了它作爲響應:

C:\>npm install -g cordova 
npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node": 
"0.12.3","npm":"2.9.1"}) 
npm WARN engine [email protected]: wanted: {"node":"~0.10.x"} (current: {"node":" 
0.12.3","npm":"2.9.1"}) 
npm WARN installMany normalize-package-data was bundled with [email protected], but bund 
led package wasn't found in unpacked tree 
npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: { 
"node":"0.12.3","npm":"2.9.1"}) 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs 
\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova" 
npm ERR! node v0.12.3 
npm ERR! npm v2.9.1 
npm ERR! code ECONNRESET 
npm ERR! errno ECONNRESET 
npm ERR! syscall read 

npm ERR! network read ECONNRESET 
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 settin 
gs. 
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! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs 
\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova" 
npm ERR! node v0.12.3 
npm ERR! npm v2.9.1 
npm ERR! code ECONNRESET 
npm ERR! errno ECONNRESET 
npm ERR! syscall read 

npm ERR! network read ECONNRESET 
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 settin 
gs. 
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! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs 
\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova" 
npm ERR! node v0.12.3 
npm ERR! npm v2.9.1 
npm ERR! code ECONNRESET 
npm ERR! errno ECONNRESET 
npm ERR! syscall read 

npm ERR! network read ECONNRESET 
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 settin 
gs. 
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! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs 
\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova" 
npm ERR! node v0.12.3 
npm ERR! npm v2.9.1 
npm ERR! code ECONNRESET 
npm ERR! errno ECONNRESET 
npm ERR! syscall read 

npm ERR! network read ECONNRESET 
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 settin 
gs. 
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! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs 
\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova" 
npm ERR! node v0.12.3 
npm ERR! npm v2.9.1 
npm ERR! code ECONNRESET 
npm ERR! errno ECONNRESET 
npm ERR! syscall read 

npm ERR! network read ECONNRESET 
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 settin 
gs. 
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' 
C:\Users\UltimateUser\AppData\Roaming\npm\cordova -> C:\Users\UltimateUser\AppDa 
ta\Roaming\npm\node_modules\cordova\bin\cordova 
[email protected] C:\Users\UltimateUser\AppData\Roaming\npm\node_modules\cordova 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected]) 
└── [email protected] ([email protected], [email protected], [email protected] 
2.3, [email protected], [email protected], [email protected], [email protected], [email protected], 
[email protected], [email protected], [email protected], [email protected], dep-graph 
@1.1.0, [email protected], [email protected], [email protected], [email protected], [email protected], np 
[email protected], [email protected], [email protected], [email protected], requ 
[email protected], [email protected]) 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs 
\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova" 
npm ERR! node v0.12.3 
npm ERR! npm v2.9.1 

npm ERR! Callback called more than once. 
npm ERR! 
npm ERR! If you need help, you may report this error at: 
npm ERR!  <https://github.com/npm/npm/issues> 

npm ERR! Please include the following file with any support request: 
npm ERR!  C:\npm-debug.log 

問題:

  1. 有沒有做過任何變化,我的意思是我可以再次成功地重複命令 或我必須「清理」這個「一切都出錯」命令後的東西?
  2. 我沒有使用任何代理服務器(儘管我不確定有關連接,家人正在從其他設備上傳視頻到YouTube)。它會影響嗎?
  3. 這是因爲我沒有下載SDK。 (對不起)
  4. 我也是在「安全模式」+ CMD +互聯網,因爲我的上網本很老,速度很慢,我使用這種模式時,我需要加快。這是原因嗎?

因此畢竟,我可以重複所有事情(在下載sdk並使用沒有任何「加載」的連接之後)。或者在我必須清理之前嘗試完成的混亂之前?

請幫忙。不要太嚴厲地判斷。 :)

UPDATE:安裝SDK,並盡一切後外 「安全模式」 我有這樣的:

C:\>npm install -g cordova 
npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node": 
"0.12.3","npm":"2.9.1"}) 
npm WARN engine [email protected]: wanted: {"node":"~0.10.x"} (current: {"node":" 
0.12.3","npm":"2.9.1"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: { 
"node":"0.12.3","npm":"2.9.1"}) 
npm WARN installMany normalize-package-data was bundled with [email protected], but bund 
led package wasn't found in unpacked tree 
C:\Users\UltimateUser\AppData\Roaming\npm\cordova -> C:\Users\UltimateUser\AppDa 
ta\Roaming\npm\node_modules\cordova\bin\cordova 
[email protected] C:\Users\UltimateUser\AppData\Roaming\npm\node_modules\cordova 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected]) 
└── [email protected] ([email protected], [email protected], [email protected] 
2.3, [email protected], [email protected], [email protected], [email protected], [email protected], shel 
[email protected], [email protected], [email protected], [email protected], [email protected], [email protected] 
4, [email protected], [email protected], [email protected], [email protected], cordo 
[email protected], [email protected], [email protected], [email protected], 
[email protected], [email protected]) 
+0

我不知道到底是什麼安全模式執行到Windows,但你應該嘗試它的安全模式之外只是爲了確認這不是唯一導致這個問題的東西。 – Randy

+0

好吧,我已經重複了一切,沒有安全模式,我也下載了,並istalled sdk。 –

+0

@Randy,請看看UPDATE。現在出了什麼問題? –

回答

4

我有相同的塔我errore通過更新NPM

npm install npm -g 
修復

我希望它適合你

+0

沒有任何變化,但它甚至有警告。 –

0

你試過更新npm嗎?請用admin/root權限更新/安裝npm。 這裏是快速命令來更新NPM npm update [-g] 如需進一步閱讀,請參閱npm update doc