Last active
January 9, 2017 01:50
-
-
Save nicco88/b30a378cc6ee6cd65ac47ef23614bba1 to your computer and use it in GitHub Desktop.
broweser sync command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Access the folder through terminal and type: | |
browser-sync start --server --index mysite.html --files="*.html,css/*.css" | |
/usr/bin/env: node: No such file or directory | |
Posted on 2015.12.22 by Tim Habersack | |
If you are getting this error, odds are you are trying to run something nodejs related on a Ubuntu/Debian Linux distro and having problems. | |
I was having this problem, then found this excellent help from StackOverflow: | |
sudo ln -s "$(which nodejs)" /usr/bin/node | |
You need to symlink the nodejs executable to node | |
The reason for this is that when you do “apt-get install node”, it installs an unrelated package, so they had to choose a different name so it wouldn’t conflict | |
Ubuntu/Debian install node as nodejs, so it doesn’t conflict with node, a package of the same name. | |
What makes this hard to deduce is if you install nodejs by: | |
sudo apt-get install npm | |
Which will install npm and nodejs. The npm will know where node is, so you can install things via npm install but then if you try to run something you installed, like grunt, you’ll get the above error. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment