Cbas Cbas - 2 months ago 12
Node.js Question

win7 express js: 'express' is not recognized in cmd

I have node.js installed and running fine on windows 7 computer. I run

> npm install -g express
> npm install -g express-generator
> npm install -g express-generator@3

and they all install successfully. But when I go to a new folder and try:

> express myproject

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

I see 'express', 'express.cmd', and 'node_modules' directory with 'express' and 'express-generator' folders in the C:\Users\ME\AppData\Roaming\npm directory

I added the npm directory to my PATH in case that was missed.

I tried all the solutions I could find:

'Express' is not recognized command (windows)!topic/express-js/Cr92_LC_pUk

what else can I try to get express working?


Check that you have the path to the express folder in the path. remember that you need to reopen cmd to apply the changes in the environment variables as modifying them does not modify the variables of the currently working processes, AFAIK. If you are changing system-wide environment variables, you may need to restart Windows.

You also may need to check if PATHEXT contains .CMD extension.