remy/nodemon — Issue #61: Error watching ignore file on windows 7 - line 179
Author: plindman
Created: 2012-02-02 17:21:34+00:00
State: open

I get the following error when i added a .nodemonignore file:

2 Feb 19:10:13 - [nodemon] reading ignore list
2 Feb 19:10:13 - [nodemon] exception in nodemon killing node
Error: use fs.watch api instead
at Object.watchFile (fs.js:734:11)
at C:\Users\...\AppData\Roaming\npm\node_modules\nodemon\nodemon.js:179:8
at Object.oncomplete (path.js:406:19)

Seems to be fixed by changing line 179:

fs.watchFile(ignoreFilePath, { persistent: false }, readIgnoreFile);
to

fs.watch(ignoreFilePath, { persistent: false }, readIgnoreFile);

P.S. seems to skip ignore file read completely when trying to use old-style nodemon-ignore file (cannot create files starting with a dot in Windows Explorer so tried the old style).