react-native - 使用 Expo 运行 React Native 教程时出现“无法连接到开发服务器”错误,怀疑 Watchman
问题描述
新反应原生和移动开发,遇到这个问题:
我正在使用 Expo CLI 作为构建工具从 Facebook 网站运行 React Native hello world。我所做的是安装 Expo,运行expo init test
,安装 cocoapods,然后 cd 进入测试目录并运行expo start
.
当我在 iOS 模拟器或我的 iPhone 上打开应用程序时,在白屏大约 3-5 分钟后出现“无法连接到开发服务器”(见截图)。
在世博会日志中。值得注意的是,每次启动时,我都会收到以下错误日志:
2019-08-25T21:49:21,474: [cli] Failed to open /Users/nsadeh/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Not a directory
ERROR
21:49
Watchman: watchman --no-pretty get-sockname returned with exit code=null, signal=SIGABRT, stderr= 2019-08-25T21:49:21,474: [cli] Failed to open /Users/nsadeh/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Not a directory
我已经尝试卸载和重新安装 Watchman 以及 Expo。不知道还能做什么。
重现:
- macOS 莫哈韦 10.14.6
- 节点 v10.16.3
- 世博会 3.0.10
- 守望者 4.9.0
- 反应原生 0.59.10
解决方案
解决方案:原来 postgreSQL 在我的库中留下了一个不相关的 LaunchAgents.plist 文件,这让 Watchman 感到困惑。重命名它解决了这个问题。
推荐阅读
- python - 如何防止seaborn将字符串转换为浮点数?
- python - Python3:类组合和派生方法
- android-studio - 为什么android studio 将Nexus 6 改为sdk gphone x86 arm?
- html - CSS下拉菜单悬停在页面加载或刷新时闪烁
- css - 为什么YouTube评论区的CSS有两个“line-height”?
- javascript - 如何在节点 js 中生成网络推送 vapid 密钥?
- arrays - 构造一个新的排序数组最有效的方法是什么?
- sql - 如何使用 BaseX 和 XQuery 查询 SQLITE 数据库?
- reactjs - 反应:重定向到不同的页面
- windows - IDataObject 异步操作完成通知