A watchman story: All of a sudden...no rebuilds


#1

After my team and I invested some hours in debugging a strange problem with Ember CLI, I want to share our story…

Friday: Everything works fine. I change some Ember code, watchman recognizes the change and triggers a rebuild and the page reloads. Great!

Monday: We run Ember CLI in a Vagrant Debian box. I messed up something in the box. Easy…just kill the box, boot it up again and voilà a clean state…but WTF…I change an ember file but no rebuild is triggered!? Nothing has changed compared to Friday. Neither the box nor the application code. My teammates don’t have this problem, but after they trigger an npm install they experience the same issue. WTF! We didn’t change package.json

So what has happened?

As you might know, npm dependencies are not that consistent across developer machines. So from friday to monday some packages deep down in the dependency tree were updated and increased the number of files and folders in our project. And boom, we hit the limit of folders that can be watched on the Debian box and watchman decided to die silently in the background…

What can you do?

Either increase the limit and/or add node_modules to .watchmanconfig

If I find some time, I will submit a PR so that you get notified by Ember CLI…