Skip to content

Watch mode stopped working on macOS Sierra #1767

Closed
@Anahkiasen

Description

This is a bug that seems to happen ever since I've updated to Sierra.

Whenever I want to run Jest in --watch mode it crashes:

$ jest --watch
2016-09-22 10:49 node[79167] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-09-22 10:49 node[79167] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-09-22 10:49 node[79167] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: Error watching file for changes: EMFILE
    at exports._errnoException (util.js:1036:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1406:11)

Tried reinstalling the node modules, checking for any updates and anything. I can't seem to reproduce it on a new project but on the other hand even if I just run an empty test suite with --testPathPattern it still crashes, so I'm guessing it's a dependency conflict somewhere. I don't have any setup files or anything, it's literally running an empty file and crashing.

I don't get any more output with --debug so not sure what else to provide to help. This does not happen with --watchman

$ node --version && npm --version && jest --version
v6.6.0
3.10.8
v15.1.1

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