Fastlane,部署 iOS,未找到致命错误 YogaKit.modulemap

Fastlane, deploy iOS, fatal error YogaKit.modulemap not found

我想使用 Fastlane 将我的 react-native 应用程序部署到 TestFlight,但出现以下错误

Compiling main.m

fatal error: module map file '/Users/amir/Library/Developer/Xcode/DerivedData/AwesomeProject-bitngzmdoketklfzyahmkpigwbxk/Build/Intermediates.noindex/ArchiveIntermediates/AwesomeProject/BuildProductsPath/Release-iphoneos/YogaKit/YogaKit.modulemap' not found

Compiling AwesomeProject_vers.c ** ARCHIVE FAILED **

The following build commands failed: CompileC /Users/amir/Library/Developer/Xcode/DerivedData/AwesomeProject-bitngzmdoketklfzyahmkpigwbxk/Build/Intermediates.noindex/ArchiveIntermediates/AwesomeProject/IntermediateBuildFilesPath/AwesomeProject.build/Release-iphoneos/AwesomeProject.build/Objects-normal/armv7/AwesomeProject_vers.o /Users/amir/Library/Developer/Xcode/DerivedData/AwesomeProject-bitngzmdoketklfzyahmkpigwbxk/Build/Intermediates.noindex/ArchiveIntermediates/AwesomeProject/IntermediateBuildFilesPath/AwesomeProject.build/Release-iphoneos/AwesomeProject.build/DerivedSources/AwesomeProject_vers.c normal armv7 c com.apple.compilers.llvm.clang.1_0.compiler (in target 'AwesomeProject' from project 'AwesomeProject')

这是我可以在 Xcode(.xcworkspace,而不是 .xcodeproj/)和 运行 设备和模拟器中打开应用程序并构建它的地方没有任何错误。

Fastfile 的健身房部分是:

gym(
    workspace: "AwesomeProject.xcworkspace",
    configuration: "Release",
    scheme: "AwesomeProject",
    export_method: "app-store",
    output_directory: output_directory,
    output_name: file_name,
    clean: true,
    include_bitcode: true
  )

环境

"react": "17.0.2",
"react-native": "0.65.1",
Xcode 13.0-Build version 13A233
fastlane-2.194.0

项目根目录下的 Gemfile 内容

source "https://rubygems.org"
gem "cocoapods", "~> 1.11.2"
gem 'fastlane'
gem "xcode-install"

解决我问题的方法是删除 Pods 文件夹和 Podfile.lock 并安装 pods 和 bundle