react-native icon indicating copy to clipboard operation
react-native copied to clipboard

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

Open rs-frank opened this issue 4 years ago • 162 comments

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-native: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

1.react-native init XXX 2.cd ios && pod install 3. xcode Product/build

Expected Results

Describe what you expected to happen.

Snack, code example, screenshot, or link to a repository:

Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve image image

rs-frank avatar Apr 03 '20 06:04 rs-frank

I'm facing the same issue. but only in the release mode. the debug build works fine.

System:
    OS: macOS 10.15.3
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
    Memory: 1.05 GB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 10.17.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
  IDEs:
    Xcode: 11.4/11E146 - /usr/bin/xcodebuild

apostopher avatar Apr 03 '20 12:04 apostopher

@apostopher this matches what I observed in Circle CI when I verified our iOS tests on Xcode 11.4.0 - no issues at all on debug mode.

hramos avatar Apr 03 '20 18:04 hramos

Facing sporatically in debug as well

LeviWilliams avatar Apr 03 '20 23:04 LeviWilliams

I managed to resolve the issue in my app. I had a mismatch between the ios version in Xcode and Podfile.

Podfile

image

Xcode

image

I changed my Podfile to platform :ios, '9.0' and ran pod install again. That did the trick.

apostopher avatar Apr 04 '20 15:04 apostopher

I have this issue too. And it's not a mismatch between versions.

wildlifechorus avatar Apr 05 '20 16:04 wildlifechorus

I had this issue too, I'm not very familiar with XCode, but I opened the .xcodeworkspace file and then clicked build, which was successful!

arjndr avatar Apr 05 '20 17:04 arjndr

Same issue. React Native -> 0.62 Xcode -> 11.4 After you create the app. it shows that: image It asks you to use .xcodeworkspace file to run, but I just want to know why I have this error in the .xcodeproj flie.

wangxum168 avatar Apr 05 '20 18:04 wangxum168

use .xcodeworkspace is ok

rs-frank avatar Apr 06 '20 08:04 rs-frank

use .xcodeworkspace is ok

not sure why the many thumbs up? is this working for people? The above problem happens also when running .xcodeworkspace in xcode.

stephanos7 avatar Apr 08 '20 13:04 stephanos7

I am also facing the same issue. Not sure what to do from here.

ghost avatar Apr 09 '20 09:04 ghost

also the same issue and stuck here :(

NiklasMencke avatar Apr 10 '20 09:04 NiklasMencke

If I run my project from project workspace then this error deosn't show up. And whenever you are using pods. You should always run your project from workspace

ghost avatar Apr 10 '20 12:04 ghost

People who are saying this is caused by not using the workspace aren't really being helpful. Thats not the cause of this specific bug, most people who use Pods would know to use the workspace, not the project.

eoinnorris avatar Apr 12 '20 15:04 eoinnorris

XCode:11.4 React Native:0.62.2 For me, changing the Build System from "Legacy Build System" to "New Build System" fixed this problem.

collamo avatar Apr 12 '20 17:04 collamo

I'm not 100% sure if the first line did the trick, or if it was just a terminal restart, but this worked for me:

sudo xcode-select --switch /Applications/Xcode.app

restart terminal (important)

cd ios && pod install

siwonia avatar Apr 12 '20 19:04 siwonia

Same issue. React Native -> 0.62 Xcode -> 11.4 After you create the app. it shows that: image It asks you to use .xcodeworkspace file to run, but I just want to know why I have this error in the .xcodeproj flie.

my solution is to add the library MANUALLY: image Then, it just works!

wangxum168 avatar Apr 13 '20 06:04 wangxum168

I've incurred in the same error, it doesn't work also with blank RN project.

System:
    OS: macOS 10.15.4
    CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
    Memory: 26.77 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 10.16.0 - /var/folders/mm/zm3z3hx96p7_9jxhs_6f8v2h0000gn/T/yarn--1586964002884-0.9192953256519525/node
    Yarn: 1.22.4 - /var/folders/mm/zm3z3hx96p7_9jxhs_6f8v2h0000gn/T/yarn--1586964002884-0.9192953256519525/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v10.16.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.1 - /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: Not Found
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6241897
    Xcode: 11.4/11E146 - /usr/bin/xcodebuild
  Languages:
    Java: 13.0.2 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0 
    react-native: 0.62.2 => 0.62.2 
  npmGlobalPackages:
    *react-native*: Not Found

giacomoalonzi avatar Apr 15 '20 15:04 giacomoalonzi

Same issue. started from nowhere. Done nothing, except internal js logic change.

bunsha avatar Apr 16 '20 17:04 bunsha

Same issue. started from nowhere. Done nothing, except internal js logic change.

If I can help you, I solved with a reboot. I mean, I did just a reboot of osx, opened the .xcworkspace file and it worked.

giacomoalonzi avatar Apr 17 '20 06:04 giacomoalonzi

Same issue. started from nowhere. Done nothing, except internal js logic change.

If I can help you, I solved with a reboot. I mean, I did just a reboot of osx, opened the .xcworkspace file and it worked.

thank you. I solved it by turning off this stupid icloud backup. First of all - its rly slows down everything, and second - its just start copying some files from my project, and i belive simply corrupt one of the files during the process.

bunsha avatar Apr 19 '20 21:04 bunsha

+1 :(

Shaharsha avatar Apr 22 '20 20:04 Shaharsha

In my case the problem was in the provisioning profile. I fixed it by checking "Automatically manage signing" in Xcode -> Signing & Capabilities, and Choosing a Team.

Shaharsha avatar Apr 23 '20 08:04 Shaharsha

still having issues to build my project through xcode 11..on screen error is YogaKit.modulemap not found...any assistance will be highly appreciated.. I have tried different suggested solution out here but none work for me

temitopealabi avatar Apr 30 '20 04:04 temitopealabi

still having issues to build my project through xcode 11..on screen error is YogaKit.modulemap not found...any assistance will be highly appreciated.. I have tried different suggested solution out here but none work for me

Finally, I found a fix finally i resolved the problem you have to give xcode full disk access all toy have to do 1- open system preference 2- open security & privacy 3- click on full disk access 4- click on the light yellow padlock in order to add xcode to the list 5-click on + button to add new app and choose xcode 6- dropdown will open then click on Applications 7- Double click on Xcode 8-click on yellow padlock to lock the folders back 9- close xcode 10 -go to your project run below code Go to your project ios folder then click on .xcworkspace extension file to open your project with xcode click on Project tab then click click on clean project Now click on build project or the play button

temitopealabi avatar Apr 30 '20 07:04 temitopealabi

I had the same problem after updating to the latest version of xcode. The problem solved itself by restarting the mac.

alexma01 avatar Apr 30 '20 18:04 alexma01

I face the same issue, none of the solutions above worked for me.

EDIT : I had use_frameworks! in the Podfile (don't from where it came from) I removed it and it works now.

snowloop avatar May 05 '20 13:05 snowloop

Hi there,

The only way for me to fix this was to switch Target from 9.0 to 11.00 Hopefully, it helps someone. Screen Shot 2020-05-06 at 7 26 51 PM

Valonfeka avatar May 06 '20 17:05 Valonfeka

sudo xcode-select --switch /Applications/Xcode.app

Yesterday I run some clean up on my computer. Xcode cache was wiped out, as well as some simulators data etc.

Not quite sure - but today I had similar issue, telling me YogaKit.modulemap is not found in DeriveredData. It was working from xcode, but not from terminal (I'm using fastlane).

The above "solution" did the job but I'm thinking it's more a workaround than actually fix.

Fortidude avatar May 08 '20 10:05 Fortidude

Same issue. React Native -> 0.62 Xcode -> 11.4 After you create the app. it shows that: image It asks you to use .xcodeworkspace file to run, but I just want to know why I have this error in the .xcodeproj flie.

my solution is to add the library MANUALLY: image Then, it just works!

Man, I dont found that lib. U have a link?

romulotorres avatar May 08 '20 19:05 romulotorres

I followed the step from below link, it worked.

http://helpinterview.com/?q=content/fatal-error-module-map-file-not-found-xcode

sureshmss2007 avatar May 14 '20 01:05 sureshmss2007