shama / gaze

:crystal_ball: A globbing fs.watch wrapper built from the best parts of other fine watch libs.
MIT License
1.16k stars 167 forks source link

TypeError [ERR_INVALID_ARG_TYPE]: The "interval" argument must be of type number. Received type string #260

Open strongpauly opened 4 years ago

strongpauly commented 4 years ago

When using node v10.16.3, this error is thrown:

(node:48837) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "interval" argument must be of type number. Received type string
    at StatWatcher.start (internal/fs/watchers.js:76:3)
    at Object.watchFile (fs.js:1304:10)
    at Gaze._pollFile (<user-dir>/node_modules/gaze/lib/gaze.js:358:10)
shama commented 4 years ago

The "interval" argument must be of type number. Received type string

Make sure your interval option is not wrapped in quotes: interval: 100 and not interval: '100'