Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fatal error: module map file YogaKit.modulemap not found

I am trying to build an iOS app and get this error. I have the project, target, and podfile all specifying iOS deployment target of 14.2. I am using Xcode V12.2.

fatal error: module map file '/Users/USERNAME/Library/Developer/Xcode/DerivedData/APPNAME-hevjyrbzqmxstztjalctjwmbxffm/Build/Products/Debug-iphonesimulator/YogaKit/YogaKit.modulemap' not found 1 error generated.

When I navigate to that directory I do not see the YogaKit.modulemap file in there. How do I configure the build to copy it to that directory or otherwise fix this error?

I am opening the .xcworkspace project file.

I already did:

rm -rf ~/Library/Developer/Xcode/DerivedData/
pod deintegrate
pod update

This is an expo ejected bare app using react-native 0.63.3 and cocoapods v1.10.0. I'm building on a Mac Mini M1.

Any help would be greatly appreciated.

like image 490
sizzle Avatar asked Dec 22 '20 04:12

sizzle


2 Answers

Make sure that the iOS deployment target version is equal or higher than the version in the podfile

Pod file target Pod file target

Xcode deployment target Xcode deployment Target

like image 192
Guy Avatar answered Nov 15 '22 17:11

Guy


In my case, I had opened the file myapp.xcodeproj and tried to build/archive the project. I could not build because the build always failed.

This time I selected File > Open > Selected the ios directory in my project i.e. myapp>packages>myapp>ios . Then, I tried to build the app. This time it worked.


You make sure you open myapp.xcworkspace file instead of .xcodeproj.

like image 39
illusionist Avatar answered Nov 15 '22 19:11

illusionist