.Cordova安装错误

时间:2016-05-01 13:47:12

标签: node.js cordova npm

我正在尝试在我的Windows 10笔记本电脑上安装cordova但最终出现错误

npm ERR! Windows_NT 10.0.10586
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 v5.4.1
npm ERR! npm  v3.3.12
npm ERR! code ECONNRESET

npm ERR! network tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:80
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:\Users\jk2\npm-debug.log

我已连接到家庭网络,因此无需代理。 我试过了 npm缓存干净但没有运气。还有什么可以检查吗?

[Cordova Installation error]

npm install -g cordova@5.4.1 --verbose给出了以下错误:

image1 image2

1 个答案:

答案 0 :(得分:0)

网络连接存在问题,请尝试运行

npm install xxx --verbose

获取更多信息。

我在你的日志中注意到cause=connect ECONNREFUSED 127.0.0.1:80,你是否将npm代理设置为127.0.0.1:80?

尝试运行

npm config get proxy
npm config get https-proxy

如果存在,请运行

npm config delete proxy
npm config delete https-proxy

取消它们。

那应该可以解决问题。