In the Atom editor, if I switch tabs in my project folder, nodemon will detect changes and restart.
Ok...
Going by the information you've given, I'd say that nodemon is reading a file change - which you'll be able to see using the verbose flag.
@remy It says the file that changed is the same one I focused on a tab of (if I switch to the tab for package.json, it blames the restart on package.json).
Did the timestamp change on the file.
On Thu, 4 Feb 2016 00:40 OKNoah [email protected] wrote:
@remy https://github.com/remy It says the file that changed is the same
one I focused on a tab of (if I switch to the tab for package.json, it
blames the restart on package.json).—
Reply to this email directly or view it on GitHub
https://github.com/remy/nodemon/issues/770#issuecomment-179552710.
@remy Looking at the last opened/modified times in Finder, it does not seem to change when I access a file in a tab.
@remy Updating to Nodemon 1.8.1 seems to fix this.
FWIW, I was able to reproduce this with nodemon 1.9.2. From what I can tell, neither the timestamp nor any other metadata changed on the file.
Enabling legacyWatch seems to fix this, so maybe the problem is with chokidar?
Had this same problem when switching tabs in Atom. Also, when using Sourcetree (a mac git client) and moving between staged files, same problem, constant reloading.
nodemon v1.9.2
atom v1.8.0
sourcetree v2.3
Mac OS X v10.11.5
Solved using legacyWatch. @mnquintana thanks for that tip 😄
Just viewing a file in the SourceTree staged files screen triggers a reload with nodemon v1.9.2. Will there be a fix for that or is legacyWatch the only way to go?
Most helpful comment
Enabling
legacyWatchseems to fix this, so maybe the problem is with chokidar?