Search code examples
node.jsnodemon

Nodemon not restarting after filechange showing [nodemon] restarting due to changes


I have installed nodemon in my nodejs using

npm install -g nodemon

now, When I run

nodemon index.js

, It starts the file.

after I make a change to my file,

it shows

[nodemon] restarting due to changes...

and it only restarts when I close the Terminal

showing

[nodemon] starting `node src/index.js`
[nodemon] restarting child process

What should I do to fix this?


Solution

  • Ok and I finally fixed it.

    I downgraded nodemon to 2.0.2 by running

    npm install [email protected] -g