3

So I am trying to follow this tutorial: https://blog.udemy.com/node-js-tutorial/

I ran npm install -g express-generator in my CMD prompt and it seemingly installs fine. No errors.

I then try to run express test1 in my app folder which is C:\node> and I get the error 'express' is not recognized as an internal or external command, operable program or batch file'. I'm completely new to node but I've followed the tutorial exactly and I've simply got stuck at this part. Any help would be greatly appreciated.

iH8
  • 27,722
  • 4
  • 67
  • 76
user1527555
  • 155
  • 1
  • 9
  • Just gave that a spin on Windows 10.0.10586 32bit, works like a charm for me, sorry. What happens if you try and run "node"? – iH8 Jan 31 '16 at 22:53
  • Node seems to work fine to. If I type 'node' in the CMD prompt it just drops to the next line and awaits for input. Express installs under C:\Users\ME\AppData\Roaming\Express. Do I need to link that to C;\Node somehow? – user1527555 Jan 31 '16 at 23:31
  • So node is correctly added to your path. Can you check in the directory where you installed node (default: C:\Program Files\nodejs\;) if there's a file called `express.cmd`? – iH8 Jan 31 '16 at 23:39
  • I did not see express.cmd anywhere. I looked under node_modules and found nothing. – user1527555 Jan 31 '16 at 23:52
  • If there's no `express.cmd` in your node directory something must have gone wrong with the install of express-generator. When i installed it, it added that file to the node directory, that's the file that get's executed when you run `express test1`. I suggest reinstalling express-generator. Perhaps use the verbose & debug options and something pops up: `npm install -g --verbose --debug express-generator` – iH8 Feb 01 '16 at 00:03
  • Thanks for the tip, I'll give that a go tomorrow and see if it works – user1527555 Feb 01 '16 at 02:42
  • I am facing the same issue. Did you find any solution ?? – Rakesh Chouhan May 31 '17 at 13:35
  • Having this same issue, any advice? – Diego Ponciano May 27 '18 at 03:24

0 Answers0