0
votes

I am using Windows 8. I have followed the steps of this link to install node.js and express. But when I am creating a project with command express project_name, I am getting following error message -

'express' is not recognized as an internal or external command, operable program or batch file.

Previously I did the same in Windows 7 machine. Then all the steps worked perfectly. But now it's not. I also tried some measures pointed out in a similar question. What should I do now?

2
Did you install express-generator? - jgillich
Yes I did. I ran the following command - npm install -g express-generator - taufique
Don't bother with this. npm install express will work fine, and then just follow the instructions on the Express site for getting started. - Brad
I agree with @Brad, but it works for me. Maybe the global modules folder isn't in your PATH? - jgillich
@jgillich Where is the global module folder located usually? - taufique

2 Answers

5
votes

It's not about whether restarted.

run this:

sudo npm install -g express-generator

In express(version 4), command line tool isn't bundled together, so the express command won't be recognized until you install the express generator.

1
votes

When this happens first make sure you restarted the system after installation. In my case I did everything right but still didn't work. But it worked perfect just after a restart.