【问题标题】:Cannot run React Native app after ejecting Expo退出 Expo 后无法运行 React Native 应用程序
【发布时间】:2018-04-24 01:12:08
【问题描述】:

我运行了npm run eject,之后无法运行我的项目。我收到此错误:

In file included from /Users/patrickbassut/Programming/beebo/.expo-source/ios/ios/Exponent/Versioned/Modules/Internal/EXDevSettings.m:3:
/Users/patrickbassut/Programming/beebo/.expo-source/ios/ios/Exponent/Versioned/Modules/Internal/EXDevSettings.h:3:9: fatal error: 'React/RCTDevSettings.h' file not found
#import <React/RCTDevSettings.h>
        ^
1 error generated.


** BUILD FAILED **



The following build commands failed:
    CompileC /Users/patrickbassut/Programming/beebo/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/ExpoKit.build/Objects-normal/x86_64/EXDevSettings.o /Users/patrickbassut/Programming/beebo/.expo-source/ios/ios/Exponent/Versioned/Modules/Internal/EXDevSettings.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/beebo.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/beebo.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
  • 反应原生:0.49.5
  • npm:4.6.1
  • 守望者:4.7.0
  • 节点:8.1.3

如果有人遇到类似问题并成功解决,请提供帮助。提前致谢!

【问题讨论】:

  • 您如何尝试运行您的应用程序?你采取了哪些步骤来得到这个错误?您是否尝试过重新安装 node 模块、重置 watchman 和清除 npm 缓存?
  • 是的,我重新安装了 npm 模块,清除了缓存,重置了 watchman,安装了 pod...
  • 您是否使用react-native run-ios 运行应用程序(假设您运行的是iOS)
  • 是的。我使用 react-native init 重新创建了我的项目并 c/p 代码。现在它工作正常

标签: android ios node.js react-native npm


【解决方案1】:

我在弹出后遇到了类似的问题,但我的问题是“缺少粉笔”。所以我通过运行以下命令解决了它:

  npm install chalk
  npm install easy-async
  npm install indent-string

我从这个thread得到了解决方案

【讨论】:

    【解决方案2】:

    这也发生在我身上。退出世博会后我遇到了很多问题。我决定使用以下方法再次创建我的项目:

    react-native init yourAppName

    而不是

    create-react-native-app yourAppName

    【讨论】:

      猜你喜欢
      • 2019-07-14
      • 2020-05-06
      • 1970-01-01
      • 1970-01-01
      • 2019-08-20
      • 2021-01-11
      • 2022-11-20
      • 1970-01-01
      • 2018-11-03
      相关资源
      最近更新 更多