Definitely a noob question so please don't judge but this has been bothering me for a while.
No more how many times I run $ sudo npm install -g express-generator
or $ npm install express -g
, everything seems to install but the command $ express
still doesn't exist.
I'm running fish shell. Also, I'm assuming this is an issue coming from my PATH file, but I'm lost on if that's .bash_profile or .bashrc.
My .bash_profile has the three lines in it:
export PATH=/usr/local/bin:$PATH
export PATH=/Users/username/.node/lib/node_modules/express-generator/bin/express:$PATH
export PATH=/Users/username/.node/bin/express:$PATH
and my .bashrc file has nothing regarding node in it.
When express installs, it returns:
/Users/username/.node/bin/express -> /Users/username/.node/lib/node_modules/express-generator/bin/express
/Users/username/.node/lib
but when I command which node
it returns
/usr/local/bin/
When I try to run $ls -l /usr/local/bin/express
it returns:
ls: /usr/local/bin/express: No such file or directory
Cannot find the diagnosis of why the express command won't work after installation.