弹出Expo后无法运行React Native应用程序

时间:2017-11-10 18:26:23

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

我跑了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
  • react-native: 0.49.5
  • npm: 4.6.1
  • 守望者: 4.7.0
  • 节点: 8.1.3

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

2 个答案:

答案 0 :(得分:3)

它也发生在我身上。在推出世博会后我遇到了很多问题。我决定再次创建我的项目:

  

react-native init yourAppName

而不是

  

create-react-native-app yourAppName

答案 1 :(得分:1)

弹出后我遇到了类似的问题,但我的是“Chalk is missing”。所以我通过运行以下命令解决了它:

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

我从这个thread

获得了解决方案