Musafiroon
Musafiroon

Reputation: 683

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?

Upvotes: 2

Views: 1007

Answers (2)

Musafiroon
Musafiroon

Reputation: 683

Ok and I finally fixed it.

I downgraded nodemon to 2.0.2 by running

npm install [email protected] -g 

Upvotes: 1

RainbowDoritosAreMine
RainbowDoritosAreMine

Reputation: 15

You can press Ctrl + C to back out of current operation instead of closing the terminal every time. :)

It has to restart when you make changes to the file.

Do (Ctrl and C) and then press the up arrow to get the last command and attempt to run the application again.

Upvotes: 0

Related Questions