When installing nodejs from http://nodejs.org – everything goes smooth but at the end when you terminal and type “node” it says invalid command. !@!@#@#@#@#
Now, you need to check
- $PATH variable being set properly. It should have /usr/local/bin in it. If not than you need to add it through export command. This would be a great help https://www.cs.purdue.edu/homes/cs348/unix_path.html
- Ok now you added it if it wasn’t there – BUT still it didn’t work … What the heck??? I re-installed node js but the same result after point # 1. So, at this point do point # 3 🙂
- type ls /usr/local/bin in terminal – and to my amusement i got “ls: bin: permission denied“.. now that was really stressing 🙂
- But now you just have to give permissions to your self to this folder … sudo chmod 775 /usr/local/bin
- That was itttttt !!!! :), type node and it will show you > in terminal…
- run node –v to check version
I am not mac expert but spent some time to make it happen – so just sharing if it helps anybody.
Thanks,
Riz