This bug usually pops up while installing native modules for iOS. The error comes up because one of the pods requires the React Native as a package. We already have React Native installed in our node_modules folder so the compiler doesn’t know which version of React Native to use.
To fix this issue you want to specify which version of React Native that ios should use.
Add the following to your pods file under your ios folder
pod 'React', :path => '../node_modules/react-native' pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
- cd to your ios folder
- delete your pods folder
pod installin your terminal