【发布时间】:2020-01-26 22:00:30
【问题描述】:
我正在尝试运行现有的世博会项目。 我已经克隆了它并运行了 yarn,然后 expo 开始了。并得到这个错误:
无法从 /path-to-project/node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-prod.js 解析模块 scheduler:模块 scheduler 在 Haste 模块映射中不存在
这可能与https://github.com/facebook/react-native/issues/4968有关
试图通过以下方式解决它:
- 清除守望者手表:
watchman watch-del-all。 - 删除
node_modules文件夹:rm -rf node_modules && npm install。 - 重置 Metro Bundler 缓存:
rm -rf /tmp/metro-bundler-cache-*或npm start -- --reset-cache。 - 移除急速缓存:
rm -rf /tmp/haste-map-react-native-packager-*。 - 多次删除和克隆项目
- 删除node_modules并重新安装
- 重新安装了 watchman、npm 并更新了 brew。
- 安装了最新版本的计划包 (0.5.0) 而不是 (0.4.0)
线索: 尝试运行 iOS 模拟器时,budling 卡在 %99
Building JavaScript bundle [================================= ] 99%
之后:
Failed building JavaScript bundle.
【问题讨论】:
标签: node.js react-native npm expo yarnpkg