2015-05-24 54 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