question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`React` pod dependency causes build to fail

See original GitHub issue

Getting:

... tries to require `react-native`, but there are several files providing this module. You can delete or fix them: 

  * `<project_path>/ios/Pods/React/package.json`
  * `<project_path>/node_modules/react-native/package.json`

Any workaround for this issue?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
MacKentochcommented, Apr 4, 2018

For history, I fixed my issue by manual linking react-native-fast-image (since pod is a real mess with react-native but I need it for firebase…).

After

  • deleting node_modules
  • deleting ios/Pods
  • then npm install
  • manual linked the library (to avoid react-link link to update podfile)
  • pod update with pod:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'beewhizz' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for beewhizz
  pod 'Firebase/Core'
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'
  pod 'Firebase/Crash'
  pod 'Firebase/Messaging'
end

  • then pod update

I had this issue like in stack overflow

To finally fix it I had to:

  • delete Developer/xcode/DereivedDatacontent
  • clean ios project (xcode clean project)
  • delete ios/build entire directory

NOW IT WORKS ✌️

1reaction
oferRoundscommented, Apr 4, 2018

@MacKentoch @n1ru4l – thanks! I was eventually able to make it work using by following the example:

https://github.com/DylanVann/react-native-fast-image/blob/master/ReactNativeFastImageCocoaPodsExample/ios/Podfile

But it was very hard… Had a long struggle! 😃

Using React has a pod dependency was the source of pain on my case

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flutter build ios failing with: Error running pod install
Your cocoapods installation was broken. So try removing the brew version first via "brew uninstall cocoapods" Then install cocoapods via sudo ...
Read more >
Troubleshooting
These are some common issues you may run into while setting up React Native. If you encounter something that is not listed here, ......
Read more >
Common Build Problems
If that build suddenly fails too, there's a good chance, that a dependency was updated and is causing the breakage. Check the list...
Read more >
Trouble with installing cocoapods
ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension. ... Could not create Makefile due to some reason, probably lack of...
Read more >
React Native SDK Troubleshooting - App Center
One possible cause is when running react-native link without CocoaPods installed. ... If you see that error, make sure the pod command from ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found