ember-cli: Ember CLI hangs with watchman 4.7.0

watchman 4.7.0 was recently released, and the Homebrew formula updated. Once I pulled down this update, the embercommand stopped working.

Running any ember command would hang indefinitely.

The workaround was to brew uninstall watchman.


Output from ember version --verbose && npm --version:

# note that this command would hang while watchman 4.7.0 was installed
# this is the output after uninstalling watchman

Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
ember-cli: 2.8.0
http_parser: 2.7.0
node: 4.5.0
v8: 4.5.103.37
uv: 1.9.1
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 46
openssl: 1.0.2h
os: darwin x64
3.10.6

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

OK, the workaround for this is:

launchctl unload ~/Library/LaunchAgents/com.github.facebook.watchman.plist
watchman version

which should output something like this:

/Users/YOURUSERNAMEHERE/Library/LaunchAgents/com.github.facebook.watchman.plist: Could not find specified service
{
    "version": "4.7.0"
}

and then things should be working again.

Follow-up from an informative comment the aforementioned watchman issue:

I solved it by deleting the <PREFIX>/var/run/watchman/<USER>-state folder (If you installed it with Homebrew, it should be /usr/local/var/run/watchman/).

You should not do that till you’ve saved a copy of the state directory, however, as that includes data that may be helpful as they’re debugging this.

brew uninstall watchman --force && brew install watchman fixed this for me

@v3ss0n although it has issues, it tends to have less issues then the alternatives 😦.

That being said, for some users who choose to want to override we do support passing --watcher flag with the following options:

  • polling
  • watchman
  • node
  • events

This allows the end user to choose what works best for them.

Please open a separate watchman issue and be sure to include your watchman logs and to search the console.app logs for watchman related messages.