在Mac中运行react-native run-ios后提示错误:
React packager ready. Failed to build DependencyGraph: Watchman error: Watcher took to long to load Try running `watchman version` from your terminal https://facebook.github.io/watchman/docs/troubleshooting.html Error: Watcher took too long to load Try running `watchman version` from your terminal https://facebook.github.io/watchman/docs/troubleshooting.html at [object Object]._onTimeout (index.js:103:16) at Timer.listOnTimeout (timers.js:92:15) See http://facebook.github.io/react-native/docs/troubleshooting.html for common problems and solutions.
之前运行没有任何问题,突然出现这样提示,反复测试多个项目和重启packager和模拟器甚至重启Mac也不行。
后来在facebook找到解决方法,升级brew,重装watchman:
watchman shutdown-server brew update brew reinstall watchman
在更新brew时候非常非常慢,输入完brew update后很久很久没任何反应。
经过很久很久才完成了升级,应该是“科学上网”问题。大家自行脑补。
解决更新慢问题,找到了一个国内镜像解决方案,本人未测试,仅供参考
http://my.oschina.net/hejunbinlan/blog/516845
评论回复