I would like to install browser-sync for my AngularJS application.
When I $ sudo npm install -g browser-sync and provide the Password for installation, I get the following output:
/usr/local/lib/node_modules/node/bin/browser-sync -> /usr/local/lib/node_modules/node/lib/node_modules/browser-sync/dist/bin.js npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
+ [email protected] added 152 packages from 279 contributors in 7.957s
I thought the browser-sync version 2.29.3 has been installed successfully. However, when I check the browser-sync version by $ browser-sync --version, the output is:
-bash: browser-sync: command not found
What is the underlying reason? Is browser-sync installed or not? I am looking forward to any explanations behind and the fix on it. Thanks!
According to MacOS – Set / Change $PATH Variable Command I set the
$PATHby export and I can find the check the corresponding version.