【问题标题】:React Native - Realm - iOS - Build input file cannot be found: .../node_modules/realm/tests/ios/RJSModuleLoader.m'React Native - 领域 - iOS - 找不到构建输入文件:.../node_modules/realm/tests/ios/RJSModuleLoader.m'
【发布时间】:2020-02-03 00:44:12
【问题描述】:

我正在尝试在现有的 React Native 项目上安装 Realm。我运行 npm install --save realm,然后是 react-native link realm。在模拟器中,我收到一个缺少领域构造函数的错误。然后我按照https://realm.io/docs/javascript/latest/#missing-realm-constructor 上的推荐步骤删除构建并运行 react-native run-ios。构建失败,我收到 2 个错误:

  • 错误:找不到构建输入文件:'/Users/seantansey/Sites/IntelligentOfficeMobile/node_modules/realm/tests/ios/RJSModuleLoader.m'

  • 错误:找不到构建输入文件:'/Users/seantansey/Sites/IntelligentOfficeMobile/node_modules/realm/tests/ios/RealmJSCoreTests.m'

我正在使用: - 反应原生 v0.60.5 - 境界 v3.2.0

【问题讨论】:

  • 您尝试使用哪个版本的领域?
  • 我也遇到了这个问题,尽管我仍然不需要链接,而且当我运行 react-native run-android 时它会出现警告
  • 我正在使用 Realm v3.2.0 并尝试在 ios 上运行
  • 最后,我不得不使用“realm”:“^3.0.0”,我的在 iOS 上也可以正常工作
  • 刚试了 3.0.0 也遇到了同样的错误

标签: ios react-native realm


【解决方案1】:

我能够通过降级到 Realm v2.28.0 来解决这个问题

【讨论】:

    猜你喜欢
    • 2019-08-10
    • 2021-04-18
    • 2019-04-12
    • 2022-09-29
    • 1970-01-01
    • 2023-01-30
    • 2017-09-09
    • 2019-03-02
    • 1970-01-01
    相关资源
    最近更新 更多