React-native-fast-image: `React` pod dependency causes build to fail

Created on 30 Mar 2018  路  8Comments  路  Source: DylanVann/react-native-fast-image

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?

Most helpful comment

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 鉁岋笍

All 8 comments

Also, when running pod install I get the message:
[!] React has been deprecated

I followed example here.

But no luck I have FastImageView does not exists when launching after pod update and caches reset:

rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update

@oferRounds Can you show us your Podfile? You should set up your Podfile like in the example here: https://facebook.github.io/react-native/docs/integration-with-existing-apps.html

@MacKentoch @n1ru4l 鈥撀爐hanks!
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

Glad it worked! @oferRounds Could you please close this issue? 馃槆

Yes! THANK YOU!

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 鉁岋笍

@MacKentoch - awesome! Thanks for sharing!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Aligertor picture Aligertor  路  3Comments

baba43 picture baba43  路  3Comments

mschipperheyn picture mschipperheyn  路  3Comments

hawkup picture hawkup  路  3Comments

StiffFy picture StiffFy  路  3Comments