-
-
Notifications
You must be signed in to change notification settings - Fork 551
Description
I have followed up with http://expressjs.com/en/starter/generator.html for express application generator, got this issue bash: express: command not found.... Tried on both windows 2016 and RHEL 8 , I got same issue. but fixed windows 2016 issue by add NODE_PATH in environment variable as NODE_PATH=C:\Users\Administrator\AppData\Roaming\npm\node_modules. but no luck on RHEL 8 by using echo 'export NODE_PATH="'$(npm root -g)'"' >> ~/.bash_profile && . ~/.bash_profile to add PATH in bash_profile.
when I run which express, I got /usr/bin/which: no express in (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/root/bin)
in deed I do see express in the node_modules in /usr/lib/node_modules, there are two directories one is express and another one is npm. no problem to run node -v and npm -v. lost my idea, any comments?
Thanks in advance