Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac (with fsevents) does not watch directories #87

Closed
vojtajina opened this issue Dec 21, 2013 · 7 comments
Closed

Mac (with fsevents) does not watch directories #87

vojtajina opened this issue Dec 21, 2013 · 7 comments

Comments

@vojtajina
Copy link
Contributor

No description provided.

@paulmillr
Copy link
Owner

Huh? Works for me. Version, node, env? Fsevents are not enabled by default currently

@vojtajina
Copy link
Contributor Author

Mac 10.9, Node 0.10.22.

@vojtajina
Copy link
Contributor Author

I'm running it through Karma, so maybe there's something else wrong. I will investigate more.

@vojtajina
Copy link
Contributor Author

This is really weird. Following code works when run on its own, but when executed inside Karma (requiring the same file from Karma rather than running it directly) it does not fire the watcher at all. I don't have enough time right now, will look into it later.

var c = require('chokidar');
var w = new c.FSWatcher({
  usePolling: false,
  ignorePermissionErrors: true,
  ignoreInitial: true,
  useFsEvents: true
});

w.add('/Users/vojta/Code/karma/test/e2e/basic');
w.on('change', function() {
  console.log('change', arguments)
});

Very often I also get this libuv error (crashing the VM, without even cleaning up):

Assertion failed: (!(handle->flags & UV_CLOSED)), function uv__finish_close, file ../deps/uv/src/unix/core.c, line 172.
Abort trap: 6

@paulmillr
Copy link
Owner

The crash is related to fsevents module, there is an open issue there.

@vojtajina
Copy link
Contributor Author

So it's something with socket.io - when flashsocket transport is enabled then, fsevents never fires.

@vojtajina
Copy link
Contributor Author

I looked into this a bit more but it's still a mystery. Created an issue on fsevents repo, closing this one.

vojtajina added a commit to karma-runner/karma that referenced this issue Dec 24, 2013
Revert to polling on Mac. Use OS events on Linux and Windows.

Eventually I wanna get rid off polling even on Mac, however it's not ready yet.

See:
https://github.com/pipobscure/fsevents/issues/17
paulmillr/chokidar#87

Basically reverts e88fbc2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants