我第一次遇到这个问题:https://github.com/facebook/react-native/issues/10088
然后我按照这个解决方案来解决该问题:https://github.com/facebook/react-native/issues/910#issuecomment-94181845
现在当我进入npm start
I get [sane] Warning: Lost connection to watchman, reconnecting..
。有什么建议么?
更新:当我将 MacOS 更新到 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:
我按照 David 提供的解决方案解决了这个问题,但我必须执行一些额外的步骤,因为我已经使用brew 安装了 watchman。以下是解决方案的命令列表:
删除watchman(由brew安装):
$ brew install rmtree
$ brew rmtree watchman
$ sudo rm -rf /usr/local/var/run/watchman
手动安装 Watchman v4.7.0(归功于 David):
$ git clone https://github.com/facebook/watchman.git
$ cd watchman
$ git checkout v4.7.0
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
chmod 您的用户的监视状态目录:
$ chmod 0700 /usr/local/var/run/watchman/<user>-state
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)