无法在Ubuntu 16.04上安装浏览同步

问题描述 投票:0回答:2

我安装了nodejs和npm。尝试使用命令安装浏览器同步npm install -g browser-sync,但出现错误

    npm install -g browser-sync
npm ERR! Linux 4.15.0-101-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "browser-sync"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! network getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
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!     /home/krishna/npm-debug.log`

无法找出问题所在。非常感谢您的帮助。

javascript node.js ubuntu npm browser-sync
2个回答
0
投票

您有网络连接问题

npm ERR! network getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443

  1. 确保您已连接到互联网
  2. 如果您位于代理后面,则“代理”配置已正确设置。请参阅:npm help config

0
投票

好像您遇到连接问题。

尝试使用ping工具检查您的连接以检查您的连接:

ping google.com

您的问题可能有很多:代理,电缆断开,dns。在Ubuntu上也可能是一个问题,要解决它值得尝试重新启动网络管理器]

sudo service network-manager restart
© www.soinside.com 2019 - 2024. All rights reserved.