Bettin_ITA
Bettin_ITA

Reputation: 15

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)

Upvotes: 1

Views: 2149

Answers (2)

OussamaA
OussamaA

Reputation: 21

I was able to keep VsCode autosave enabled and nodemon is restarting the server automatically after using this solution : NodeJS - nodemon not restarting my server (I'm working with WSL2 (Ubuntu20.04)) hope this helps

Upvotes: 0

Vahe Yavrumian
Vahe Yavrumian

Reputation: 558

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

File => Preferences => Settings

find AutoSave and turn it of

Upvotes: 7

Related Questions