SooJungChae
SooJungChae

Reputation: 229

express: command not found error

I know there are many answers in this topic but still not solved my problem.

My settings:

I tried this:

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

Answers (2)

HARMANPREET KAUR
HARMANPREET KAUR

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

hong4rc
hong4rc

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

Related Questions