javascript - 无法在 Ubuntu 16.04 上安装浏览同步
问题描述
我安装了 nodejs 和 npm。尝试使用命令安装 browser-sync
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`
无法弄清楚出了什么问题。高度赞赏帮助。
解决方案
看起来您遇到了连接问题。
尝试使用 ping 工具检查您的连接来检查您的连接:
ping google.com
您的问题可能有很多:代理、断开的电缆、dns。在 Ubuntu 上也可能是一个问题,要解决它值得尝试重新启动网络管理器
sudo service network-manager restart
推荐阅读
- c# - C#:在 OData 中手动创建过滤器选项
- visual-studio - 是否有实现类似于 VS 2010 的查找或搜索对话框的 Visual Studio 扩展?
- django - Django:缩短应用程序 url 的最简单方法是什么?
- php - 我将 pdf 转换为图像的代码仅适用于我,而不适用于我的团队(使用 imagick),我不知道为什么
- odoo - Odoo POS (v9) 验证订单时出错(文档类型:ir.filters,操作:读取)
- python-3.x - Python - 按条件分组
- algorithm - R5RS 中 Racket 中的 Mergesort
- python - 过滤字符串列表,但过滤器必须出现在某个位置
- ruby - 如何使用 url 和 api_key 作为参数创建一个新方法,然后在 ruby 2.5.3 中将它们连接起来?
- angular - 无法运行角度为 10 的角度材料