I am using nodmeon version 1.9.1 on a linux machine.
I run nodemon using nodemon --watch ./build , where I have the contents of index.js in the build folder.
But when I run nodemon, it continues to search for the index.js file in the project home folder, so it throws an error because it cannot find it there.
I tried checking nodemon --help for a better option, but I can't see it, and also wrote it in the package.json file in the scripts object, which it still causes the same error.
I also tried to run it, since nodemon --watch ./build/index.js still throws an error.
Also the index.js file contains only console.log('hello world'); to make sure it is nodemon .
source share