简体   繁体   English

在Windows 8.1上安装Phonegap时出错

[英]Error in installing Phonegap on Windows 8.1

When installing phonegap on my computer, I receive this error message. 在计算机上安装phonegap时,我收到此错误消息。 I have no idea how to fix it. 我不知道如何解决它。

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

I have tried changing the registry using C:\\Users\\Scott>npm config set registry="http://registry.npmjs.org/" , but I cannot resolve the error. 我尝试使用C:\\Users\\Scott>npm config set registry="http://registry.npmjs.org/"来更改注册表,但无法解决该错误。 I have tried uninstalling and re installing node.js, but that did not work either. 我曾尝试卸载并重新安装node.js,但这也不起作用。 I am working on my home network if that helps at all. 如果有帮助,我正在我的家庭网络上工作。 I have also tried installing previous versions of phonegap with no success. 我也尝试过安装以前版本的phonegap,但没有成功。 I have also tried installing cordova and that has not worked either. 我也尝试安装cordova,但也没有用。 Gives the same error. 给出相同的错误。

It looks like NPM cannot access the internet. 看起来NPM无法访问Internet。 If you are under cooperation network you might need to set proxy for NPM. 如果您在合作网络下,则可能需要为NPM设置代理。 npm config set proxy http://your-proxy-server:your-proxy-port . npm config set proxy http://your-proxy-server:your-proxy-port The proxy setting in IE will NOT be used by NPM you need to manually setup. 您需要手动设置NPM不会使用IE中的代理设置。

HTH. HTH。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM