nodemon -v
: 1.15.0node -v
: v8.9.1Restart without crashing
Nodemon crashes when changes happen
watch
script to package.json as follows: nodemon --watch test.txt --exec echo \"Changed\"
yarn watch
I upgraded to 1.15.0 because 1.14.12 (as package dependency) wasn't working for me, but I have installed nodemon 1.12.4 () globally, and I if remove the package dependency and let the script to run with the global version it works just fine, so this is obviously a breaking change between that versions
This is the output:
[nodemon] 1.15.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: test.txt
[nodemon] starting `echo Changed`
Changed
[nodemon] clean exit - waiting for changes before restart
C:\...\nodemontest\node_modules\nodemon\lib\monitor\watch.js:128
return f[0].toUpperCase() + f.slice(1);
^
TypeError: Cannot read property 'toUpperCase' of undefined
at C:\...\nodemontest\node_modules\nodemon\lib\monitor\watch.js:128:21
at Array.map (<anonymous>)
at FSWatcher.filterAndRestart (C:\...\nodemontest\node_modules\nodemon\lib\monitor\watch.js:127:21)
at emitTwo (events.js:126:13)
at FSWatcher.emit (events.js:214:7)
at FSWatcher.<anonymous> (C:\...\nodemontest\node_modules\chokidar\index.js:199:15)
at FSWatcher._emit (C:\...\nodemontest\node_modules\chokidar\index.js:241:5)
at FSWatcher.<anonymous> (C:\...\nodemontest\node_modules\chokidar\lib\nodefs-handler.js:263:16)
at FSReqWrap.oncomplete (fs.js:153:5)
error Command failed with exit code 1.
I'm experiencing the same issue under the same conditions (apart of using npm
instead of yarn
)
I'll get on it. Thanks for reporting - I'll try to get a fix out very fast as it seems to be simple to replicate.
me too~~
Thanks for raising this issue, and hopefully you're happy with @remy's fix. If you'd like to support this project, you can do just that through the open collective https://opencollective.com/nodemon/donate or at the very least, starring this project would give me @remy a little smile 鉂わ笍
Most helpful comment
I'll get on it. Thanks for reporting - I'll try to get a fix out very fast as it seems to be simple to replicate.