Nodemon can't set path [solved]

I’m trying to install a package globally in npm on my windows 10 computer.
npm install -g nodemon

When I run nodemon app.js I get

nodemon is not recognized as a internal command... blah. blah. blah.

Reading up on it, I set my path with:

$ npm config get prefix
C:\Users\Family\.node_modules_global

$ set PATH=%PATH%;C:\Users\Family\.node_modules_global;

After running this I did nodemon app.js and it worked. I closed the terminal and took a break. Later I came back and tried to run the command again, and got the error previously mentioned. The command only set my path temporarily, how can I permanently add global npm to path?

1 Like

Been a while since I’ve used Windows, but these instructions look right to me.

I remember I had a similar problem with closing the terminal and losing the Path variable. I think in my case it was either because I didn’t make the change as the administrator, or because I did it for the ‘user’ rather than the ‘system’…or something like that…

2 Likes

Thanks, got it working with the help!