Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nodemon restart at every change, not at the saves

I'm creating a nodejs project and I've been used nodemon since the beginning. It used to go very well, the server was running while I was coding and at the time I saved the file, nodemon restarted the server. Now, every time I change a little bit one of the files, without saving, nodemon restart the server. I use VS Code and this problem started when I did some changes in settings (but not in nodemon ones). One of them was to connect my folder with a git repository. Could it be that vs code source control get every single changes and nodemon see that? Is there any setting comand I can use to force him to work only at explicit saves?

(I hope my EN wasn't so bad)

like image 308
Bettin_ITA Avatar asked Oct 15 '25 04:10

Bettin_ITA


1 Answers

I think you accidentally turned on autosave, and VSCode saves your work after every small change. To turn it off, go to

File => Preferences => Settings (or CMD/CTRL + , )

Find AutoSave and turn it off

like image 59
Vahe Yavrumian Avatar answered Oct 16 '25 20:10

Vahe Yavrumian