4
votes

I just followed the 'getting started' post on ember-cli's homepage.

I installed ember 0.1.2, bower, phantomjs, etc.

I created my app, however, when I run 'ember server' it outputs the following:

version: 0.1.2
Livereload server on port 35729
Serving on http://0.0.0.0:4200

But freezes. When i try to access the page it hangs indefinitely. I also cant close the server (ctrl+c). I am forced to kill -9.

I would really like to get this worked out if possible! I had an earlier version of ember-cli installed ( 0.0.3 ish? ) and it was working fine at the time.

If more information is required, please let me know what you need in the comments!

ember -v outputs :

version: 0.1.2
node: 0.13.0-pre
npm: 2.1.2

Thanks

2
No errors no nothing? - Patsy Issa
ember -v output could be useful. Also, windows, linux, mac? - jakecraige
I added ember -v output to the question. Im on mac the latest yosemite (10.10). I don't see any errors, and am not sure how to debug hanging like this. - Ricky Mason
Have you tried running with a non-pre version of node? - HeroicEric
Try ember build, sometimes ember serve does not report errors propertly. - user663031

2 Answers

12
votes

There's a bug in the upgrade process from watchman 4.6 to 4.7. The solution, from the watchman team (which doesn't require you to uninstall and reinstall watchman) is to reload the watchman launch daemon. Once you do, it'll spin itself back up correctly:

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

This should output something like this:

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

If for some reason that doesn't work, you can fall back to another workaround (which also doesn't require uninstalling and reinstalling watchman): delete the existing watchman socket from your "state", where <user> below is your username (e.g. for me it's chris, so chris-state instead of <user>-state). For example, if you used Homebrew to install, that command looks like this:

rm /usr/local/var/run/watchman/<user>-state/sock

The problem here arises from a Watchman upgrade which failed to properly clear out all the relevant data. You can see where they tracked down the underlying cause here, and the original Ember issue here.

10
votes

I had the same issue today, and found that it is a watchman issue.

If you run watchman version (like ember-cli does), it hangs, and re-installing watchman solves the issue

By the way, you can see the ember-cli's output by setting the DEBUG environment variable, like this: DEBUG=* ember build. In my case it shows "ember-cli:watcher detecting watchman" as the last message when its hangs.

https://github.com/twitter/libwatchman/issues/5

https://github.com/facebook/watchman/issues/96