node.js - 安装cordova时出错

标签 node.js cordova cmd phonegap-build

我试图在我的电脑上安装 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>

最佳答案

您安装的node.js版本是0.12,卸载它并尝试安装0.10.0版本的node.js。然后尝试安装cordova。

希望这会有所帮助...

关于node.js - 安装cordova时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28645648/

相关文章:

python - uszipcode Windows 命令提示符 : ImportError: DLL load failed: The specified module could not be found

batch-file - 设置 EnableDelayedExpansion 时未正确评估变量

node.js 在向 mongodb 中插入许多记录时静默停止

javascript - 如何在javascript中编写自己的数组方法?

javascript - 无法向 Google 智能显示屏发送推送通知

html - 错误 ITMS-9000 : "Invalid Image Path error when uploading ipa file

javascript - 正则表达式不匹配内容,而是匹配整个搜索字符串

ios - 在 iOS 模拟器中从 firebase 推送通知

java - 将变量传递给java进程

javascript - 处理订单队列 (Redis) 的最佳选择是什么?