Question

I'm new in node js, I'm triying to install globally express

npm i -g express

all completes, but when I enter express --help it says that it's not inside or outside command, however when i enter supervisor it runs OK. I looked into pathof express and there is no any .cmd file. If the problem is that. How should i fix it?

Please help.

Était-ce utile?

La solution

Installing npm install -g express will install express 4. Express 4 separates the generator from express. What you need to do is to run:

 $ npm install -g express-generator

Then it will work.

Autres conseils

As stated in express Readme [1], you need to install express generator separately, using following command:

npm install -g express-generator@3

[1] - https://github.com/visionmedia/express/blob/master/Readme.md

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top