I can´t install nodemon globally, "nodemon" not recognized

Since node prefix is not in the PATH ENV variable , any of the globally installed modules are not getting recognized.

Please try this.

Open cmd prompt

npm config get prefix

append the resulting path to PATH env variable.

Now you should be able to run nodemon from any location.


This is what i have done on my local machine


C:\>npm config get prefix
C:\Users\username\AppData\Roaming\npm

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

C:\>nodemon
 31 Jul 22:30:29 - [nodemon] v0.7.8
 31 Jul 22:30:29 - [nodemon] to restart at any time, enter `rs`
 31 Jul 22:30:29 - [nodemon] watching: C:\
 31 Jul 22:30:29 - [nodemon] starting `node `
 ^CTerminate batch job (Y/N)? Y

I also got same error as you with this command:

$ sudo npm install -g nodemon

I just really switched as "root" and then just ran:

$  npm install -g nodemon

I think npm has a bug to not work with sudo, but it works fine when you are really "root".