更新后出错,BigSur 11.3 XCode 12.5 (12E262) React-Native 和 Expo

Errors after update, BigSur 11.3 XCode 12.5 (12E262) React-Native and Expo

将 BigSur 升级到 11.3、Xcode 到 12.5 和 iOS 到 14.5 后,我无法在真实设备上或在模拟器.

React-Native --> 本机反应 运行-ios

kikirim@Levent-MacBook-Pro test % react-native run-ios
error Could not find "Podfile.lock" at /Users/kikirim/Desktop/React-Native/test/ios/Podfile.lock. Did you run "pod install" in iOS directory?
info Found Xcode project "test.xcodeproj"
xcrun: error: active developer path ("/Volumes/MacOS/MacOs_Prog/Xcode-12.5.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
(node:5077) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
error Could not get the simulator list from Xcode. Please open Xcode and try running project directly from there to resolve the remaining issues.
Error: Command failed: xcrun simctl list --json devices
xcrun: error: active developer path ("/Volumes/MacOS/MacOs_Prog/Xcode-12.5.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.

    at checkExecSyncError (child_process.js:616:11)
    at Object.execFileSync (child_process.js:634:15)
    at runOnSimulator (/Users/kikirim/Desktop/React-Native/test/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:164:54)
    at Object.runIOS [as func] (/Users/kikirim/Desktop/React-Native/test/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:121:12)
    at Command.handleAction (/Users/kikirim/Desktop/React-Native/test/node_modules/@react-native-community/cli/build/index.js:186:23)
    at Command.listener (/Users/kikirim/Desktop/React-Native/test/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:315:20)
    at Command.parseArgs (/Users/kikirim/Desktop/React-Native/test/node_modules/commander/index.js:651:12)
    at Command.parse (/Users/kikirim/Desktop/React-Native/test/node_modules/commander/index.js:474:21)
    at setupAndRun (/Users/kikirim/Desktop/React-Native/test/node_modules/@react-native-community/cli/build/index.js:265:24)
info Run CLI with --verbose flag for more details.
kikirim@Levent-MacBook-Pro test % 

React 博览会 --> npm 运行 ios

** BUILD FAILED **


The following build commands failed:
        CompileC /Users/kikirim/Library/Developer/Xcode/DerivedData/text-gncpkkxvjxsnedbswzsxcynreivq/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Folly.build/Objects-normal/x86_64/DistributedMutex.o /Users/kikirim/Desktop/React-Native/text/ios/Pods/Flipper-Folly/folly/synchronization/DistributedMutex.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Flipper 似乎有问题。我没有使用 Flipper,所以我只是把它注释掉了。

  1. cd ios
  2. 从 podfile 中评论 Flipper:

use_flipper!()

post_install 执行 |安装程序|

react_native_post_install(安装程序)

结束

  1. 运行“吊舱分解”
  2. pod 安装
  3. CD ..
  4. npm 运行 ios

您应该按照以下步骤更新 React Native:

https://react-native-community.github.io/upgrade-helper

否则你将面临多重问题。