Reputation: 533
I tried install express (using -g for global) in Windows 7 using
npm install -g express
I get the following and no errors:
npm http GET https://registry.npmjs.org/express
...
npm http GET https://registry.npmjs.org/mime/-/mime-1.2.11.tgz
npm http 200 https://registry.npmjs.org/mime/-/mime-1.2.11.tgz
npm http 304 https://registry.npmjs.org/debug/0.8.0
[email protected] C:\Users\xxx\AppData\Roaming\npm\node_modules\express
├── [email protected]
├── [email protected]
..
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected])
When I type express, I get:
'express' is not recognized as an internal or external command.
Any idea why this would happen?
Upvotes: 3
Views: 3101
Reputation: 454
Express is not meant to be run on command prompt. If you're trying to generate the base express project then you can use express-generator, you can install it using:
npm install -g express-generator
After success installtion, then to generate an express project:
express myProject
you can run now your project using one of the following commands:
npm start OR node myProject
Upvotes: 0
Reputation: 1042
I ran into the same problem on Windows 8.1 use this command
npm install -g express-generator
or
npm install -g express-generator@'version'
like
npm install -g express-generator@3
Upvotes: 5