How to fix: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js

Node v14 introduced a breaking change to the fs.watch() API, specifically that the recursive option (which has never been supported on Linux) now raises the ERR_FEATURE_UNAVAILABLE_ON_PLATFORM error if used on Linux.

A bug report and fix have been submitted to filewatcher: https://github.com/fgnass/filewatcher/pull/6

Until that fix is merged and a new version released, you'll need to stick to NodeJS < v14, or override the filewatcher package installed locally to include that patch.


It seems this error caused by node.js v14, to fix it use this command:

ts-node-dev --poll src/app.ts

Or you can use another version of node.js rather than version 14