sudo npm install nodemon -g
sudo npm install nodemon -g
// This command will install nodemon into the system
// Installing globally should do the trick if you get 'command not found' error //
npm install -g nodemon --save-dev
// package.json
"scripts": {
"dev": "nodemon server.js"
},
//This happens because nodemon is not installed globally on your machine
//solution
npm install -g nodemon
npx nodemon server.js
npx nodemon server.js
or add in package.json config:
...
"scripts": {
"dev": "npx nodemon server.js"
},
...
then run:
npm run dev
nodemon command not foundWhatever By Mysterious Monkey on May 16 2020
npx nodemon server.js
or add in package.json config:
...
"scripts": {
"dev": "npx nodemon server.js"
},
...
then run:
npm run dev
...
"scripts": {
"dev": "npx nodemon server.js"
},
...
"scripts": {
"dev": "./node_modules/nodemon/bin/nodemon.js yourServer.js"
},
//then run
$ npm run dev
npm run dev