reactjs - 在 iOS 中进行构建时 React Native 显示错误 - 构建失败以下构建命令失败:CompileC
问题描述
一切正常。我刚刚做了 npm audit fix 并且出现了这个错误。
我做过但没用的事情:
我删除了节点模块并再次安装它们。删除了 podfile.lock 并尝试了命令 pod install。关闭 Xcode 并重新启动它。我尝试了许多替代 StackOverflow 解决方案,但没有奏效。谁能帮我解决这个问题?
=== BUILD TARGET toolbar-android OF PROJECT Pods WITH CONFIGURATION Debug ===
Check dependencies
** BUILD FAILED **
The following build commands failed:
CompileC /Users/jindalsaw/Library/Developer/Xcode/DerivedData/PipeApp-egsumunmosmxkzatcgfjoitkddtm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNGestureHandler.build/Objects-normal/x86_64/RNGestureHandlerManager.o /Users/jindalsaw/Desktop/zzzz/ReactApp_mobile/PipeApp/node_modules/react-native-gesture-handler/ios/RNGestureHandlerManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
我的播客文件:
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native/scripts/react_native_pods'
platform :ios, '14.2'
target 'PipeApp' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
pod 'RNFS', :path => '../node_modules/react-native-fs'
target 'PipeAppTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'PipeApp-tvOS' do
# Pods for RNTodo-tvOS
target 'PipeApp-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
解决方案
Either try running Xcode with rosetta: Right click Xcode > get info > Open using Rosetta
Or run from terminal with npx react-native run
in one and arch -x86_64 npm run ios
in another
推荐阅读
- c# - 如何通过 Docker.Dotnet 客户端对 DockerHub 上的私有仓库进行身份验证?
- json - 如何强制 Nancy 对整数使用 application/json 响应?Nancy 假设它们是 StatusCode
- java - 使用 Java 拒绝 AWS S3 访问
- ios - 当 UITextView isScrollingEnabled 为 false 时,NSLayoutManager drawGlyphs 无限循环
- meteor - Meteor isServer 没有立即调用
- ios - 如果设备上安装的iOS通用链接上有多个支持的应用程序,是否可以选择每次打开的应用程序?
- r - R:将信息从反应函数传递到渲染图
- javascript - 错误:连接终止 - ASYNC nodeJS
- width - 烛台 ApexChart 中条形不可控制的宽度/缩进
- mongodb - mongoDB,猫鼬,无法连接到数据库