BrowserSync : Command not found after installing browser-sync

Faheem Hassan Zunjani picture Faheem Hassan Zunjani · Feb 19, 2016 · Viewed 9.2k times · Source

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

Answer

bolav picture bolav · Feb 19, 2016

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