0

I am tailing a file for change and using fs.watch on a directory for newly added files and I received the following error causing my app to crash after a couple of hours working?

Any ideas what this means or why it would occur?

events.js:288
      throw er; // Unhandled 'error' event
      ^

Error: ECONNRESET: connection reset by peer, watch
    at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:127:28)
Emitted 'error' event on FSWatcher instance at:
    at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:133:12) {
  errno: -4077,
  syscall: 'watch',
  code: 'ECONNRESET',
  filename: null
Jack.c
  • 1,035
  • 1
  • 11
  • 14
  • Is the directory you're watching on a network drive/mount? – AKX Jun 04 '20 at 11:35
  • (Also, you might want to look at https://github.com/paulmillr/chokidar for a better watch experience.) – AKX Jun 04 '20 at 11:36
  • It is on a network drive, would you say I lost connection to that drive? Looked into chokidar but had issues watching a network folder. – Jack.c Jun 04 '20 at 12:01
  • I would say you intermittently lost network connection, yeah. – AKX Jun 04 '20 at 12:08

0 Answers0