React Native 'yarn run ios' 没有在 M1 上初始化项目

Posted

技术标签:

【中文标题】React Native \'yarn run ios\' 没有在 M1 上初始化项目【英文标题】:React Native 'yarn run ios' doesn't initialize the project on M1React Native 'yarn run ios' 没有在 M1 上初始化项目 【发布时间】:2021-07-21 06:36:51 【问题描述】:

我是 Mac OS 及其系统和 M1 的新用户。每当我尝试 yarn run ios 命令时,它会打开普通模拟器,但不是我正在构建的项目,它会抛出错误和错误代码 65:

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening dealerApp.xcodeproj.
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project dealerApp.xcodeproj -configuration Debug -scheme dealerApp -destination id=0A358C3D-FE10-4872-9913-F927BCC93B29

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Using build description from disk
note: Build preparation complete
PhaseScriptExecution Start\ Packager /Users/bigez/Library/Developer/Xcode/DerivedData/dealerApp-cixnurkshkczahhihjqgcgbblssu/Build/Intermediates.noindex/dealerApp.build/Debug-iphonesimulator/dealerApp.build/Script-FD10A7F022414F080027D42C.sh (in target 'dealerApp' from project 'dealerApp')

【问题讨论】:

【参考方案1】:

我通常运行yarn ios

另外,您可以尝试使用 Xcode 运行该项目。它应该为您提供更有用的错误日志,以便您找出真正的问题所在。寻找红色的 X 图标,看看它们在说什么。

【讨论】:

以上是关于React Native 'yarn run ios' 没有在 M1 上初始化项目的主要内容,如果未能解决你的问题,请参考以下文章

React Native:在执行“yarn ios”后构建失败

错误命令失败,退出代码为 1。使用 react-native 和 yarn eslint

React Native,AwesomeProject,react-native run-ios:** 构建失败 **

运行 react-native run-ios 时出错

react-native 0.57 run-ios 失败解决办法

react-native run-ios 不工作