1

I have tried installing express-generator via global but it's not found.

I have tried opening a new CMD / Powershell and same thing happens.

PS C:\Users\testuser\testme> npm install -g express-generator
npm http GET https://registry.npmjs.org/express-generator
npm http 304 https://registry.npmjs.org/express-generator
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/keypress
npm http 304 https://registry.npmjs.org/minimist
C:\ProgramData\chocolatey\lib\nodejs.commandline.0.10.31\tools\express -> C:\ProgramData\chocolatey\
lib\nodejs.commandline.0.10.31\tools\node_modules\express-generator\bin\express
express-generator@4.9.0 C:\ProgramData\chocolatey\lib\nodejs.commandline.0.10.31\tools\node_modules\
express-generator
├── commander@1.3.2 (keypress@0.1.0)
└── mkdirp@0.5.0 (minimist@0.0.8)
PS C:\Users\testuser\testme> express
express : The term 'express' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path
is correct and try again.
At line:1 char:1
+ express
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (express:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\testuser\testme>

This has been installed globally.

Any ideas?

halfer
  • 19,824
  • 17
  • 99
  • 186
Martin
  • 23,844
  • 55
  • 201
  • 327
  • please check C:\Users\testuser\AppData\Roaming\npm for the express executable (should be two files) – Laura Dec 03 '14 at 16:36

1 Answers1

2

Check your PATH to be sure it includes the location for globally installed modules.

At a command prompt:

  1. type npm ls -g --depth=0 and note the directory printed on the first line of output
  2. type PATH to see if the directory found in step #1 is in the path...

If (when) the npm global install directory is missing from your PATH, adding it should fix the problem.

See this other StackOverflow question as a reference: Grunt on Windows 8: 'grunt' is not recognized

Community
  • 1
  • 1
Matthew Bakaitis
  • 11,600
  • 7
  • 43
  • 53