Search code examples
ember.jsember-cli

ember-cli is hanging on ember server command


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


Solution

  • 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.