When you build apps for iOS using React Native, sometimes you will encounter problems while running the build, one of them is that you don’t find the ExpoModulesCore package as shown below.
This error occurs because the expomodulescore version in the pod is not available with the same version used in package.json. So below I will list the steps I took to deal with this error.
- Because in case we using using react-native version 0.64.4, so change or add expo-modules-core version to ^0.6.5 on your package.json
- Delete node_modules folder in project root
- Delete yarn.lock and package-lock.json if exist in project root
- Install JS Package using yarn (don’t using NPM because sometimes making error) yarn install and make sure your yarn version 1.22.x above.
- Synchronize package.json with pods in folder ios using command pod deintegrate and pod install.
- Run command npx install-expo-modules in root project to installing expo-modules on node_modules and pod.
- then, try to run iOS app using yarn run ios.