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

1.8k Views Asked by At

I want to deploy my react-native application with Fastlane to TestFlight, where I get the follwing error

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')

This is where I can open the app in Xcode (the .xcworkspace, NOT .xcodeproj/), and run the app in device and simulator and build it without any error.

The gym section of the Fastfile is:

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
  )

the environment

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

The Gemfile content at the root of project

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

There are 1 best solutions below

0
On BEST ANSWER

What solved my problem was to delete the Pods folder and Podfile.lock and install the pods with bundle