Install and use nodemon locally
Add "nodemon index.js" to your "start" script of package.json. Ex.
"scripts": { "start": "nodemon index.js" }
And then use "npm start" to start using nodemon
Configure your your devserver script as following,
"devserver": "nodemon index.js"
Or
"devserver": "./node_modules/.bin/nodemon server.js"
nodemon will be recognized in current project, if its installed
you want to serve index.js
with nodemon so use nodemon at the start of command.
You dont have to trace the path of nodemon in node modules, after you install it in the project.
"devserver": "nodemon index.js"