简体   繁体   English

无法安装 npm 包:浏览器同步

[英]Unable to install npm packages: browser-sync

i am getting tunneling socket error while installing browser-sync module,i'm behind a corporate proxy..我在安装浏览器同步模块时遇到隧道套接字错误,我在公司代理后面..

 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

You need to configure NPM to be able to use it from behind a corporate proxy.您需要配置 NPM 才能从公司代理后面使用它。 You can do this easily by running 2 commands in the terminal replacing the domain and port with the ones for your company network -您可以通过在终端中运行 2 个命令来轻松完成此操作,将域和端口替换为您公司网络的域和端口 -

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

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

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