【问题标题】:.Cordova installation error.Cordova 安装错误
【发布时间】:2016-05-03 02:24:51
【问题描述】:

我正在尝试在我的 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 缓存清理但没有运气。现在还能检查什么?

[]

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

image1 image2

【问题讨论】:

    标签: node.js cordova npm


    【解决方案1】:

    你的网络连接有问题,尝试运行

    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
    

    取消设置。

    这应该可以解决问题。

    【讨论】:

    • npm config get proxy npm config get https-proxy 给我'null'。当我执行 npm install -g cordova@5.4.1 --verbose 我在主要问题中附加了图像。 image1 image2
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-13
    • 2014-02-28
    • 1970-01-01
    • 2014-09-15
    • 2016-10-20
    相关资源
    最近更新 更多