filewatcher
filewatcher copied to clipboard
fs.watch with recursion doesn't work on Linux
Hello, I'm having a problem running a project which uses filewatcher as a dependency, I'm running node v14.1.0
on the latest version of Manjaro, I've encountered this error:
> [email protected] start /home/onlurking/Documents/band-aid
> ts-node-dev -r ./src/env.ts --respawn src/server.ts --errorOnMissing=true
Using ts-node version 8.6.2, typescript version 3.8.3
TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
at Object.watch (fs.js:1441:11)
at add (/home/onlurking/Documents/band-aid/node_modules/filewatcher/index.js:74:34)
at /home/onlurking/Documents/band-aid/node_modules/filewatcher/index.js:93:5
at FSReqCallback.oncomplete (fs.js:176:5)
The recursion option is not avalaible on Linux systems according to the node.js fs.watch documentation:
The recursive option is only supported on macOS and Windows. An ERR_FEATURE_UNAVAILABLE_ON_PLATFORM exception will be thrown when the option is used on a platform that does not support it.
I'm working on a fix.
@fgnass can you take a look at this please? I've raised this issue because of ts-node.