Duplicate Module Name: react-native

After running pod install you get this bug

Mon, 07 Jan 2019

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.

  1. 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'
  2. cd to your ios folder
  3. delete your pods folder
  4. run pod install in your terminal
Buy Me A CoffeeDigitalOcean Referral Badge
Edward Beazer

Edward Beazer - I just like to build shit. Sometimes I get stuck for hours, even days while trying to figure out how to solve an issue or implement a new feature. Hope my tips and tutorials can save you some time.

DigitalOcean Referral Badge