Creating or Deleing file/directory causes nodemon to reload even though its ignored #211

LiamKarlMitchell opened this Issue Oct 12, 2013 · 3 comments

3 participants


So I have this in my .nodemon ignore

And in the /scripts/ directory when I create,delete a file nodemon reloads.
When I just edit and save a file nodemon does not reload.

It is desirable that nodemon does not reload as this scripts directory can have files created at runtime and executed.

Did I do something wrong with my ignore file?
I am using nodemon v0.7.10 and node v0.10.16 and Windows 7

Apart from this nodemon has been working great for me.


Just to confirm, there's no space in your .nodemonignore file, right?

I don't have windows 7 to hand that I can test with. Your ignore file looks right, but obviously it's being missed. I've got a debug version of nodemon in the works that would show you hits and misses on the restarts - but it's not ready for release yet.


Thanks for the reply,

File name is '.nodemonignore'
Contents below: inside `
# ignore certian directorys


@AMoo-Miki is attached to all dirs, irrespective of anything in .nodemonignore, and ignoredFilter is applied only on files within the folders, meaning that the ignore patterns are only applied on files and not on dirs.

To solve this, in nodemon.js, fs.realpath(file, watch) on line 274 should be changed to

if (ignoredFilter(file)) {
    fs.realpath(file, watch)

and fs.realpath(dir, watch) on line 296 should be change to

if (ignoredFilter(dir)) {
    fs.realpath(dir, watch)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment