FG
๐Ÿ“ฑ Mobile & Cross-Platform

xcode 11.4 build fatal error: module map file xxx/Build/Products/Debug-iphoneos/YogaKit/YogaKit.modulemap' not found

Freshabout 20 hours ago
Mar 14, 20260 views
Confidence Score95%
95%

Problem

Please provide all the information requested. Issues that do not follow this format are likely to stall. Description fatal error: module map file '/Users/miaohao/Library/Developer/Xcode/DerivedData/apex_baojia2-cdczyhhwbgshmtbdymitajpzamao/Build/Products/Debug-iphoneos/YogaKit/YogaKit.modulemap' not found React Native version: Run `react-native info` in your terminal and copy the results here. System: OS: macOS 10.15.3 CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz Memory: 219.52 MB / 8.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.16.1 - /usr/local/bin/node Yarn: 1.22.0 - /usr/local/bin/yarn npm: 6.13.4 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.8.4 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 Android SDK: API Levels: 23, 24, 25, 26, 27, 28, 29 Build Tools: 26.0.2, 28.0.3 System Images: android-23 | Android TV Intel x86 Atom, android-23 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 3.6 AI-192.7142.36.36.6241897 Xcode: 11.4/11E146 - /usr/bin/xcodebuild Languages: Python: 2.7.16 - /usr/local/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: 0.62.0 => 0.62.0 npmGlobalPackages: react-na

Error Output

error: module map file '/Users/miaohao/Library/Developer/Xcode/DerivedData/apex_baojia2-cdczyhhwbgshmtbdymitajpzamao/Build/Products/Debug-iphoneos/YogaKit/YogaKit.modulemap' not found

Unverified for your environment

Select your OS to check compatibility.

2 Fixes

Canonical Fix
Unverified Fix
New Fix โ€“ Awaiting Verification

Fix YogaKit Module Map Not Found Error in Xcode

Medium Risk

The error occurs because the YogaKit module map file is not being generated during the build process, which can be caused by issues with the CocoaPods installation, incorrect build settings, or missing dependencies in the project configuration.

Awaiting Verification

Be the first to verify this fix

  1. 1

    Clean Build Folder

    Start by cleaning the build folder in Xcode to remove any cached files that might be causing the issue.

    bash
    Command + Shift + K
  2. 2

    Delete Derived Data

    Manually delete the Derived Data folder to ensure that Xcode rebuilds everything from scratch. You can do this by navigating to the following path in Finder: /Users/miaohao/Library/Developer/Xcode/DerivedData/ and deleting the 'apex_baojia2-cdczyhhwbgshmtbdymitajpzamao' folder.

    bash
    rm -rf /Users/miaohao/Library/Developer/Xcode/DerivedData/apex_baojia2-cdczyhhwbgshmtbdymitajpzamao
  3. 3

    Update CocoaPods

    Ensure that CocoaPods is up to date and install the necessary pods for your project. Run the following commands in your project directory.

    bash
    pod install --repo-update
  4. 4

    Check Build Settings

    Verify that the 'Framework Search Paths' and 'Header Search Paths' in your Xcode project settings include the paths to the YogaKit framework. This can be found under 'Build Settings' in your project.

    N/A
    N/A
  5. 5

    Rebuild the Project

    After performing the above steps, rebuild your project in Xcode to see if the issue is resolved. Use Command + B to build the project.

    bash
    Command + B

Validation

To confirm the fix worked, ensure that the project builds successfully without the 'module map file not found' error. Additionally, check the Build Products directory to verify that the YogaKit.modulemap file is present.

Sign in to verify this fix

1 low-confidence fix
Unverified Fix
New Fix โ€“ Awaiting Verification

Fix YogaKit Module Map Not Found Error in Xcode

Medium Risk

The error occurs because the YogaKit module map file is not being generated during the build process, likely due to an issue with the CocoaPods installation or Xcode's derived data. This can happen if the YogaKit library is not properly linked or if the derived data is corrupted.

Awaiting Verification

Be the first to verify this fix

  1. 1

    Clean Xcode Derived Data

    Remove the derived data for the project to clear any corrupted build artifacts.

    bash
    rm -rf ~/Library/Developer/Xcode/DerivedData/*
  2. 2

    Update CocoaPods

    Ensure that CocoaPods is up to date and re-install the pods to regenerate the module map files.

    bash
    pod repo update && pod install
  3. 3

    Check Podfile for YogaKit

    Verify that YogaKit is correctly included in your Podfile. If not, add it and run pod install again.

    ruby
    pod 'YogaKit'
  4. 4

    Rebuild the Project

    After cleaning derived data and ensuring CocoaPods is correctly set up, rebuild the project in Xcode to see if the error persists.

    none
    Open Xcode and select Product > Clean Build Folder, then Product > Build.
  5. 5

    Verify Build Settings

    Check the build settings in Xcode to ensure that the 'Framework Search Paths' and 'Header Search Paths' include the correct paths for YogaKit.

    none
    Navigate to Build Settings > Search Paths in Xcode.

Validation

To confirm the fix worked, attempt to build the project again in Xcode. If the build completes without the 'module map file not found' error, the issue is resolved.

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

react-nativemobileiosandroidplatform:-iosstaleimpact:-crashtool:-xcode