yogakit/yogakit.modulemap' not found React Native, on Apple M1

Viewed 148

I am trying to compile a hello-world react-native app that has WatermelonDB configured. I have a M1 Macbook Pro M1 and am following the instructions given here and and here to set up the project for Watermelon. Once setup, the compile for Android works correctly, but the compile for iOS fails with the following error:

enter image description here

This issue is discussed over here, but the problem is that this error can occur in a lot of different situations. As a result there are loads of different suggestions, not all of which are particular to this issue arising on an M1.

I am using Xcode 13.4 and am trying to get the application launching on an iOS simulator as I do not have an iOS phone to test on.

Please do not offer solutions that involve installing older versions of react-native or Xcode. I am looking the solution to get the latest version of react-native working on the latest version of Xcode.

1 Answers

I have managed to get it working by making use of Rosetta. I did the following steps before I start creating the project.

  1. Find Xcode in applications folder, right click on it and select "Get Info"

enter image description here.

  1. In the info dialog that opens up, check the checkbox labeled "Open using Rosetta" and then close the dialog.

enter image description here

After doing this, I followed all of the steps in the tutorial that I linked to in the question. The log still showed the error that I originally posted:

enter image description here

But the build continued, completed and was successfully launched on the iOS simulator.

enter image description here

Maybe there are better solutions that don't depend on Rosetta. But this works for me for now.

Edit: Another thing that I did differently the second time I did this tutorial was to start the Xcode setup by double clicking on the .xcworkspace rather than on the .xcodeproj file. Not sure if this was part of the solution.

Related