BrowserSync:安装浏览器同步后找不到命令 [英] BrowserSync : Command not found after installing browser-sync
问题描述
还有一个标题相同的未解决问题,但使用该问题给出的解决方案无法解决我的错误.
There was another issue open with the same title which has been closed but my error could not be resolved using the solutions given in that issue.
- Mac OSX El Capitan
- 节点[v5.6.0]
- Npm [v3.6.0]
我使用以下命令成功安装了Browser-Sync:
bash
$ sudo npm install -g browser-sync
I installed Browser-Sync successfully using :
bash
$ sudo npm install -g browser-sync
但是当我通过输入来检查浏览器同步版本时:
bash
$ browser-sync --version
but when I check the browser-sync version by typing :
bash
$ browser-sync --version
我收到此错误:
bash
-bash: browser-sync: command not found
I get this error :
bash
-bash: browser-sync: command not found
推荐答案
通过运行npm bin -g
来检查npm在哪里安装了二进制文件,然后将其添加到您的PATH
中.
Check where npm installs it's binaries by running npm bin -g
, and then add that to your PATH
.
export PATH=$PATH:/usr/local/bin
这篇关于BrowserSync:安装浏览器同步后找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!