安装科尔多瓦时出错
Posted
技术标签:
【中文标题】安装科尔多瓦时出错【英文标题】:Error while installing cordova 【发布时间】:2015-02-21 12:11:33 【问题描述】:我试图在我的 PC 中安装 cordova。我收到以下错误。
> Your environment has been set up for using Node.js 0.12.0 (x64) and npm.
C:\Users\DELL>npm install -g cordova
npm WARN engine npm@1.4.28: wanted: "node":">=0.8","npm":"1" (current: "node"
:"0.12.0","npm":"2.5.1")
npm WARN engine cordova-js@3.7.3: wanted: "node":"~0.10.x" (current: "node":"
0.12.0","npm":"2.5.1")
npm WARN engine xmlbuilder@2.2.1: wanted: "node":"0.8.x || 0.10.x" (current:
"node":"0.12.0","npm":"2.5.1")
npm ERR! fetch failed http://registry.npmjs.org/resolve/-/resolve-0.7.1.tgz
npm WARN retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND p
roxy.company.com
npm ERR! fetch failed http://registry.npmjs.org/resolve/-/resolve-0.7.1.tgz
npm WARN retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND p
roxy.company.com
npm ERR! fetch failed http://registry.npmjs.org/resolve/-/resolve-0.7.1.tgz
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.0
npm ERR! npm v2.5.1
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! network getaddrinfo ENOTFOUND proxy.company.com
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! Please include the following file with any support request:
npm ERR! C:\Users\DELL\npm-debug.log
C:\Users\DELL>
【问题讨论】:
您是否恰好在代理后面,或者您是否将 npm 配置为使用“proxy.company.com”?因为这似乎是您出现问题的原因 是的,我将 npm 配置为使用“proxy.company.com”。因为当我搜索错误时,有一个解决方案,比如在网站上这样做。现在我该如何解决这个问题? 我也试试,npm config set proxy proxy.company.com:8080 npm config set https-proxy proxy.company.com:8080来自这个链接:***.com/questions/17996200/… 【参考方案1】:您安装的node.js 版本是0.12,卸载相同并尝试安装0.10.0 版本的node.js。然后尝试安装cordova。
希望这会有所帮助...
【讨论】:
以上是关于安装科尔多瓦时出错的主要内容,如果未能解决你的问题,请参考以下文章