Reputation: 683
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
Reputation: 683
Ok and I finally fixed it.
2.0.2
by runningnpm install [email protected] -g
Upvotes: 1
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