1# Install nodemon on your project as dev-dependency
2npm install nodemon --save-dev
3#or
4npm i nodemon --save-dev
5#nodemon as -dev cause there is no need nodemon in production
1# when this command doesn't work:
2npm install -g nodemon
3
4# Can try
5
6sudo npm install -g nodemon
7
8#It will then ask you to enter the password you use to log on to your computer.
9#So, if you have any problems with this step.
10#1. Make sure you are logged in to your computer on an account with admin privileges.
11#2. Use sudo in front of the installation command.
12#3. Type your password when prompted. Note your password typing will not show. Just hit enter once you've typed it all.
1//install globally to your system path.
2npm install -g nodemon
3//install nodemon as a development dependency:
4npm install --save-dev nodemon