首页 > 解决方案 > 尝试在 High Sierra 10.13.6 上运行 react-native cli

问题描述

以下是我正在使用的版本:

每当我运行时,我都会收到此错误react-native run-ios

构建失败

以下构建命令失败:
CompileC /Users/matthewharrison/Library/Developer/Xcode/DerivedData/LiveApp2-amxfqqouedceorcarxmrstlitata/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Folly.build/Objects-normal/x86_64/ VirtualEventBase.o /Users/matthewharrison/Desktop/dev/LiveApp2/ios/Pods/Flipper-Folly/folly/io/async/VirtualEventBase.cpp 正常 x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (1 失败)

有什么我想念的吗?我已经完成了我在这里看到的所有错误。现在我开始认为这与我的环境有关。我这样想错了吗?有没有人在 High Sierra 上成功运行了当前版本的 react native?

请帮忙!

标签: react-nativereact-native-ios

解决方案


您正在使用 react-native 版本 0.64

在 react-native 版本 0.64 中,您需要使用 XCode 12

看到这个官方公告https://reactnative.dev/blog/2021/03/12/version-0.64#major-dependency-version-changes

Major Dependency Version Changes

- Dropped Android API levels 16-20.
The Facebook app consistently drops support for Android versions with sufficiently low usage.
As the Facebook app no longer supports these versions and is React Native’s main testing surface, React Native is dropping support as well.
- Xcode 12 and CocoaPods 1.10 are required
- Minimum Node support bumped from 10 to Node 12
- Flipper bumped to 0.75.1

推荐阅读