To fix nodemon not found in npm with JavaScript, we install nodemon.
To install it, we run
npm install nodemon --save
Then we add
{
//...
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon app.js"
}
//...
}
in package.json to add the start script to run app.js with nodemon.
Then we run
npm start
to start the script.