//You need to install it globally
npm install -g nodemon
// or if using yarn
yarn global add nodemon
/*
And then it will be available on the path (I see now that you have tried
this and it didn't work, your path may be messed up)
If you want to use the locally installed version,
rather than installing globally then you can create a script in your package.json
*/
"scripts": {
"serve": "nodemon server.js"
},
//and then use
npm run serve
// without adding serve in package.json
yarn run nodemon server.js
// with serve script in package.json
yarn run serve