zsh: Command not found: nodemon

by | 11 August 2020 | JavaScript | 0 comments

I came across this error message when I installed Nodemon in my Full Stack JavaScript app and then tried to run the command nodemon in the Terminal to start my application. The problem was that I installed Nodemon locally in my project and not globally. To solve the problem I uninstalled my local dependency and used this command in the terminal to sort out the problem:

sudo npm i -g nodemon
This command installs Nodemon globally and you can access it in any project.

Note: Sudo is for Mac users, like myself, to get access to save things to password protected areas on the computer.

After having it installed globally, instead of locally in my project, I could run this command in the Terminal and the app started to run and listen to my changes:

If you have come across this same problem I hope this solution works for you too.

Happy Coding!