After I have installed node, it works. I quit terminal and then I can't use node
command in bash. Would anyone know why this is happening? Its rather infuriating. I think it may be something to do with the $PATH variable not being initialised in the right order or not at all.
I followed the 1st option https://gist.github.com/isaacs/579814