Reputation: 229
I know there are many answers in this topic but still not solved my problem.
My settings:
I tried this:
sudo npm install -g express-generator
from herereinstall node.js
from herenpm init
. (But just 'package.json' is made when I finish this tutorial)When I install express and express-generator,
$ npm install -g express
+ [email protected]
updated 1 package in 1.499s
$ npm install -g express-generator
/Users/soodiamond/.npm-global/bin/express ->
/Users/soodiamond/.npm-global/lib/node_modules/express-generator/bin/express-cli.js
+ [email protected]
updated 1 package in 0.925s
still not find express command
$ express myapp
-bash: express: command not found
Upvotes: 0
Views: 515
Reputation: 11
I had the exact same problem while installing express for the first time. Probably the @4.16 version has some issues.
Try:
sudo npm install -g [email protected]
Worked for me!
Upvotes: 1
Reputation: 4103
Module express
don't have bin
in package.json, so you can't call it.
(npm
don't create file express
in bin folder)
When you run : sudo npm install -g express-generator
,
Upvotes: 1