yuanchuan / node-watch

A wrapper and enhancements for fs.watch
https://npm.im/node-watch
MIT License
341 stars 44 forks source link

Catch error when use Node 14.15.3 on Linux SysTem #109

Closed lichongyang-LCY closed 3 years ago

lichongyang-LCY commented 3 years ago

image image Normal operation after changing to "recursive: false"

lichongyang-LCY commented 3 years ago

(node:11548) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) fs.js:1521 throw new ERR_FEATURE_UNAVAILABLE_ON_PLATFORM('watch recursively'); ^

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:1521:11) at watch (/root/xxx/node_modules/node-watch/lib/watch.js:221:8) at /root/xxx/node_modules/node-watch/lib/watch.js:180:14 at Array.forEach () at /root/xxx/node_modules/node-watch/lib/watch.js:179:13

watch(dir, {recursive: true, followSymLinks: true}, function (evt, filename) {});

yuanchuan commented 3 years ago

This was a fixed issue, please upgrade to latest version.

https://github.com/yuanchuan/node-watch/issues/94