express command not found in bash after installing it with npm express command not found in bash after installing it with npm express express

express command not found in bash after installing it with npm


Starting from express 4.00 you also need to install express generator with:

npm install -g express-generator

Only after this will you be able to run express as a command!

For confirmation see: ExpressJS.com - Migrating to Express 4


npm install express -g

You need to install it globally.

Npm 1.0 installs modules locally by default. So the bash executable lives in /node_modules/bin/. You can add that folder to PATH or you can just install express globally so that it's picked up by PATH


I had this problem and was installing node via Homebrew. The problem was being caused by Homebrew.

So I did:

brew uninstall node

and then installed node using the installer on the nodejs.org site.

Then I ran:

npm install -g express

And voila no problems.