【问题标题】:Unable to install npm packages: browser-sync无法安装 npm 包:浏览器同步
【发布时间】:2015-10-07 20:42:25
【问题描述】:

我在安装浏览器同步模块时遇到隧道套接字错误,我在公司代理后面..

npm ERR! fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f
2.tar.gz
npm WARN retry will retry, error on last attempt: Error: tunneling socket could
not be established, cause=Parse Error

【问题讨论】:

    标签: node.js npm


    【解决方案1】:

    您需要配置 NPM 才能从公司代理后面使用它。您可以通过在终端中运行 2 个命令来轻松地做到这一点,用您公司网络的域和端口替换域和端口 -

    npm config set proxy http://proxy.company.com:8080
    npm config set https-proxy http://proxy.company.com:8080
    

    【讨论】:

    • 您是否更改了域和端口以镜像贵公司提供的那些?
    猜你喜欢
    • 2020-11-09
    • 1970-01-01
    • 2018-06-15
    • 1970-01-01
    • 2020-09-28
    • 1970-01-01
    • 1970-01-01
    • 2017-12-12
    相关资源
    最近更新 更多