BrowserSync : Command not found after installing b

2019-01-25 20:33发布

问题:

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
  • Node [v5.6.0]
  • Npm [v3.6.0]

I installed Browser-Sync successfully using : bash $ sudo npm install -g browser-sync

but when I check the browser-sync version by typing : bash $ browser-sync --version

I get this error : bash -bash: browser-sync: command not found

回答1:

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