henning glatter-götz

express-generator on OSX/homebrew node install

The express docs claim that you can simply install the express-generator globally and use it to generate application skeletons.

Well, I followed the instructions to install express-generator

1
$ npm install -g express-generator

and got

1
2
$ express
-bash: express: command not found

I am working on OSX and installed node via homebrew, which is what is causing this issue, at least for express. Because other globally installed packages worked fine.

The output of the installation gives you a hint. The executable is installed in

1
/usr/local/share/npm/bin/

Add that directory to your path and it will solve the problem.

1
export PATH=/usr/local/share/npm/bin:$PATH

Comments