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

时间:2021-04-28 13:34:17

标签: xcode react-native expo updates macos-big-sur

在将 BigSur 升级到 11.3、Xcode 到 12.5、iOS 到 14.5 后,我无法在真实设备和模拟器中运行 iOS 应用。

React-Native --> react-native run-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-Expo --> 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)

2 个答案:

答案 0 :(得分:2)

Flipper 似乎有问题。我没有使用 Flipper,所以我只是将其注释掉。

  1. cd ios
  2. 从 podfile 中注释掉 Flipper:

use_flipper!()

post_install 做 |安装程序|

react_native_post_install(安装程序)

结束

  1. 运行“pod deintegrate”
  2. pod 安装
  3. cd ..
  4. npm 运行 ios

答案 1 :(得分:0)

您应该按照以下步骤更新 react native:

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

否则您将面临多个问题。