I was first getting this issue: https://github.com/facebook/react-native/issues/10088
Then I followed this solution to resolve for that issue: https://github.com/facebook/react-native/issues/910#issuecomment-94181845
Now when I enter npm start
I get [sane] Warning: Lost connection to watchman, reconnecting..
. Any suggestions?
Update: This started happening when I updated my MacOS to MacOS Sierra.
Update: So I tried running react-native run-ios
which opens a new console window and invokes npm start
. Its still gives the [sane] Warning: Lost connection to watchman, reconnecting..
warnings but its builds the bundle. So watchman connection is getting broken in between. Here is the console screenshot:
I have a simular issue and looking at the logs for Watchman I get these errors happening each time you see the "Lost Connection to Watchman" message.
UPDATE: Ok, found a solution which so far seems to work. I uninstall watchman completely, then build it from source using the following which seems to work fine (any attempt at installing via brew causes the problems above but this works):
run this command inside project folder
I solved this problem by following the solution provided by David but I had to do some extra steps because I already had installed watchman using brew. Here are the list of commands for the solution:
Deleting watchman (installed by brew):
Manually install Watchman v4.7.0 (credits to David):
Chmod your user's watchman state directory: