0

For some reason, despite having:

C:\Users\name\AppData\Roaming\npm

in my environment variables (I double checked - it's in my User PATH variable), I'm unable to run nodemon directly without getting the standard 'nodemon' is not recognized as an internal or external command error.

When I installed nodemon, I ran the following:

> npm install -g nodemon

Currently, in order to use nodemon, I'm required to run the following:

> set PATH=%PATH%;C:\Users\name\AppData\Roaming\npm
> nodemon

After re-setting the path, I can run nodemon again - that is - until I close the command prompt, at which point I need to run "set PATH" all over again.

To re-iterate, the path is always there in my environment variables, so I have no idea why I need to set it each time...

Novark
  • 419
  • 4
  • 15

2 Answers2

0

Are you saying you checked the path inside your command window prior to setting the path? How do you launch the command window?

Reenactor Rob
  • 1,508
  • 1
  • 11
  • 20
  • Yes, I've confirmed the PATH variables directly in the command window. I've run cmd.exe in Administrator mode just to make sure that it's not a permissions problem, but that doesn't solve the problem either. – Novark Oct 18 '15 at 23:45
0

I solved my issue.

It turns out that there was a space directly before my npm user environment variable. For example, the PATH variable looked like this:

C:\path1;C:\path2; C:\Users\name\AppData\Roaming\npm

Note the space after the second path. After removing this space, everything worked correctly.

Novark
  • 419
  • 4
  • 15