在Windows 8.1上安装Phonegap时出错
问题描述:
在我的计算机上安装phonegap时,收到此错误消息。我不知道如何解决它。在Windows 8.1上安装Phonegap时出错
C:\Users\Scott>npm install -g phonegap
npm ERR! network connect ETIMEDOUT
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! System Windows_NT 6.2.9200
npm ERR! command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "phonegap"
npm ERR! cwd C:\Users\Scott
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! syscall connect
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR!
npm ERR! Additional logging details can be found in: npm ERR! C:\Users\Scott\npm-debug.log
npm ERR! not ok code 0
我试过用更改注册表,但我无法解决该错误。我已经尝试卸载并重新安装node.js,但那也不起作用。如果有帮助,我正在家庭网络上工作。我也尝试安装以前版本的phonegap,但没有成功。我也尝试安装科尔多瓦,并没有奏效。给出同样的错误。
答
看起来NPM无法访问互联网。如果您处于合作网络中,则可能需要为NPM设置代理。 npm config set proxy http://your-proxy-server:your-proxy-port
。在IE中的代理设置将不会被您需要手动设置的NPM使用。
HTH。
我做了你所说的,现在而不是etimedout,我现在有一个econnrefused错误。任何解决方案? – WilliamWallace