6

I'm working on a react native project, by default they are two build configurations (Debug and Release) that works just fine. However, when i create a new build configuration by duplicating the Release configuration and then try to run the application targeting the created build configuration, i get the following error:

fatal error: module map file 'PathToBuildFolder/Stage-iphoneos/YogaKit/YogaKit.modulemap' not found

Stage is the name of the created build configuration, any idea how i can solve this ?

Thx

2 Answers 2

4

If you are following Yee Wong Medium Blog and end up with this issue, I have fixed it with below solution

  1. add below line in pod file
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

project '{PROJECT_NAME}', 'Dev.Debug' => :debug, 'Dev.Release' => :release  <--------- ADD THIS LINE

def add_flipper_pods!(versions = {})
  1. Replace all the instances of 'Debug' to ['Dev.Debug', 'Dev.Release', 'Debug']

Before:

pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'

After:

pod 'FlipperKit', versions['Flipper'], :configuration => ['Dev.Debug', 'Dev.Release', 'Debug']

// Change all the configruation =>

  1. npx pod-install

  2. select Dev scheme and run on simulator

After doing above changes my project build successfully, Refer below links for help:

  1. Main medium link https://medium.com/@ywongcode/building-multiple-versions-of-a-react-native-app-4361252ddde5

  2. https://github.com/react-native-community/upgrade-support/issues/30

Sign up to request clarification or add additional context in comments.

2 Comments

Hi please use the code highlighting feature to improve the readability of your post. Thanks
Is there something else one would need to do to run an app built with the duplicated Debug config with the metro server? I can build it successfully, but it just crashes immediately on the simulator.
0

This is related with this issue I solved my problem with following picture

enter image description here

1 Comment

Hello, thanks for the response, i tried this with the duplicated build configuration and i got the same problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.