Skip to content

Error: EMFILE: too many open files, watch #7

Description

@chrisryanouellette

Platform & Details
Computer: M4 Macbook Air
Ram: 16gb
Version: Tahoe 21.6
Node: 22.22.3

I also tried node 20 & 24, same error.

Please let me know what else I can provide.

Full error message

spawn EBADF
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: EMFILE: too many open files, watch
    at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)
    at FSEvent.callbackTrampoline (node:internal/async_hooks:130:17)
Error: EMFILE: too many open files, watch
    at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)
    at FSEvent.callbackTrampoline (node:internal/async_hooks:130:17)
Unhandled Rejection for:  Promise {
  <rejected> Error: EMFILE: too many open files, watch
      at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)
      at FSEvent.callbackTrampoline (node:internal/async_hooks:130:17) {
    errno: -24,
    syscall: 'watch',
    code: 'EMFILE',
    filename: null
  },
  [Symbol(async_id_symbol)]: 910859,
  [Symbol(trigger_async_id_symbol)]: 887149,
  [Symbol(kResourceStore)]: undefined,
  [Symbol(kResourceStore)]: undefined
} 
With the reason:  Error: EMFILE: too many open files, watch
    at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)
    at FSEvent.callbackTrampoline (node:internal/async_hooks:130:17) {
  errno: -24,
  syscall: 'watch',
  code: 'EMFILE',
  filename: null
}
second error, exiting
Error: EMFILE: too many open files, watch
    at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)
    at FSEvent.callbackTrampoline (node:internal/async_hooks:130:17) {
  errno: -24,
  syscall: 'watch',
  code: 'EMFILE',
  filename: null
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions