I’ve inherited a React Native project which built happily about 8 months ago. Now I have come back to it, I can’t get it to build. Being a near incompetent on Apple platform development (I work mostly in C# in Visual Studio on Windows) I’m really struggling to figure out what is going on. I figured that I should follow all the suggested component version upgrades, staring with MacOS which I’ve updated to Sonoma 14.5, I’ve also updated VSCode (1.19.0), XCode (15.4), React Native (0.63.4) and anything else related to the errors I was getting, including (I think) Yarn, NPM, Cocoa Pods, TypeScript, UncleTomCobly etc.
My book of instructions tells me to run “yarn ios” to run the application – which gives me warnings such as:
warn Package appcenter contains invalid configuration: “dependency.platforms.ios.podspecPath” is not allowed. Please verify it’s properly linked using “npx react-native config” command and contact the package maintainers about this.
… and I see that the build fails, with the error:
fatal error: module map file ‘/Users/[username]/Library/Developer/Xcode/DerivedData/AVA-fsaxpziewqiiolegepfufekpmvgv/Build/Products/Release-iphonesimulator/YogaKit/YogaKit.modulemap’ not found
If I try to open the project in XCode and build there, I see (8) errors in react-native-safe-area-context, starting:
/Users/[username]/[project]/node_modules/react-native-safe-area-context/ios/SafeAreaView/RNCSafeAreaProvider.m Build input file cannot be found: ‘/Users/[username]/[project]/node_modules/react-native-safe-area-context/ios/SafeAreaView/RNCSafeAreaProvider.m’. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?
… and 7 similar.
If I browse the file system, I don’t see the folder “SafeAreaView” – the file “RNCSafeAreaProvider.m” seems to be located in the parent “ios” folder. I’m assuming that the initial problem is as simple as this – i.e. something along the way has changed the paths that these libraries(?) live in and the build script cannot locate them. However, for the life of me, I can’t find where to look for where the path is stored.
Please can you help? And please, be gentle, as I’m very new to this development set up, and after many days of failure, am quite close to running away screaming. I just can’t seem to find sources of basic information on how to use the tools and the last time I had to use a command line this much was when Kajagoogoo was in the charts.
Z
(I’ve tried searching the project using the find tools in XCode and VSCode. I’ve searched for the error messages but similar questions are unanswered. I’ve watched countless YouTube videos on setting up a React Native development environment. I’ve asked my wife what she knows about Yoga and Cocoa Pods (the answers to which were unhelpful).
I was expecting that perhaps there is a configuration file that needs editing or a tool version that needs upgrading and there are novice-level instructions on how to do so.)