首页 > 解决方案 > React Native Awesome 项目构建失败

问题描述

一直在尝试在 VS Code 中运行启动 AwesomeProject 文件,但每次我运行npx react-native run-ios......下面的构建失败都会出现。浏览了这里的堆栈、评论和问题,但我找不到任何适用的东西。

尝试更改我的终端和 Xcode 以使用 Rosetta 加载,但我也收到错误...

softwareupdate --install-rosetta
Installing Rosetta 2 on this system is not supported.

Not sure where to go from here... 

** BUILD FAILED **


The following build commands failed:
        PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/********/Library/Developer/Xcode/DerivedData/AwesomeProject-ekivgffrflagyugqmoefmykxoyqy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-337605CB7CDF90939BEBF863ED22C375.sh (in target 'FBReactNativeSpec' from project 'Pods')
(1 failure)

info Run CLI with --verbose flag for more details.

标签: node.jsreactjsreact-nativevisual-studio-code

解决方案


我也有这个错误,我搜索了几个小时......帮助我的是将 react native 的版本降级为 "react-native": "0.62.3" from 0.64

它也适用于 0.63。

其他人发现这很有帮助:https ://github.com/facebook/react-native/issues/32157


推荐阅读