Search code examples
react-nativeexpopodspec

Unable to find a specification for `ExpoModulesCore` depended upon by `Expo`


I am trying to add expo dependencies (media-library and mail-composer to be exact) to a React Native Project. I yarn added both dependencies as well as yarn add expo-modules@latest and yarn add expo-modules-core. Then I ran npx pod-install and just to be safe, as cd'd into iOS and ran pod install. Both pod commands failed and gave the following error:


Couldn't install: Expo » ExpoModulesCore. Updating the Pods project and trying again...
Command `pod install` failed.
└─ Cause: Unable to find a specification for `ExpoModulesCore` depended upon by `Expo`

I deleted node_modules, iOS/Pods, iOS/build, and yarn.lock, I reinstalled everything with yarn and then tried again, to get the same result.


Solution

  • I was avoiding using npm install or npx install in order to keep everything on yarn, BUT there is one command you need to run with npx. Its npx install-expo-modules, once I ran that everything was fixed