Nodemon - exclusion of files This is a popular question but many people had trouble getting it to work, myself included.
I'm going to have to work through this (I can't move my index.js file) so will post my solution when I find one.
Aviator@AW:/mnt/c/Users/Adrian$ nodemon index.js --ignore exclude_nodemon.json
[nodemon] 2.0.13
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
Hello
[nodemon] Internal watch failed: EBADF: bad file descriptor, watch '/mnt/c/Users/Adrian/AppData/Local/ElevatedDiagnostics'
Aviator@AW:/mnt/c/Users/Adrian$
Contents of exclude_nodemon.json:
{
"verbose": true,
"ignore": ["*.test.js", "AppData/*"],
}
Also tried:
nodemon index.js --ignore "AppData/*"
nodemon index.js --ignore 'AppData/*'
but the result was the same.
Tried: nodemon index.js --ignore AppData/
got [nodemon] Internal watch failed: EBADF: bad file descriptor, watch /mnt/c/Users/Adrian/Local Settings/ElevatedDiagnostics
.
Tried: nodemon index.js --ignore AppData/ Local\ Settings/
got: [nodemon] starting `node index.js "Local Settings/"
Same error.
Tried:nodemon index.js --ignore AppData/, Local\ Settings/
Same error.