react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

RN 0.60 issue with Linking RNFirebase

Open eggybot opened this issue 7 years ago • 16 comments

Hi, recently I tried installing RN v0.60 (fresh install). When I'm Linking RNFirebase v5.5.4 this error show's up.

inntro:ztestapp eddie$ react-native link react-native-firebase
warn Package react-native-firebase has been ignored because it contains invalid configuration. Reason: Unknown option dependency.platforms.android.buildPatch with value "" implementation project(':react-native-firebase')"" was found. This is either a typing error or a user mistake. Fixing it will remove this message.
error Unknown dependency. Make sure that the package you are trying to link is already installed in your "node_modules" and present in your "package.json" dependencies. Run CLI with --verbose flag for more details.

Please note that this issue is happening when I'm trying to execute this command react-native link react-native-firebase to the project.

This error show's on my new installed project. Is there any compatibility issue from the latest React-Native v0.60?


Project Files

iOS

Click To Expand

ios/Podfile:

  • [ ] I'm not using Pods
  • [ ] I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • [ ] my application is an AndroidX application?
  • [ ] I am using android/gradle.settings jetifier=true for Android compatibility?
  • [ ] I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

System:
    OS: macOS 10.14.5
    CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
    Memory: 3.06 GB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.14.0 - /usr/local/bin/node
    Yarn: 1.12.3 - /usr/local/bin/yarn
    npm: 6.10.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
    Android SDK:
      API Levels: 23, 24, 25, 26, 27, 28
      Build Tools: 28.0.2, 28.0.3
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5522156
    Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-native: 0.60.0 => 0.60.0 
  npmGlobalPackages:
    react-native-cli: 2.0.1
    react-native-git-upgrade: 0.2.7
    react-native-rename: 2.4.0
  • Platform that you're experiencing the issue on:
    • [ ] iOS
    • [ ] Android
    • [ ] iOS but have not tested behavior on Android
    • [ ] Android but have not tested behavior on iOS
    • [x] Both
  • react-native-firebase version you're using that has this issue:
    • 5.5.4
  • Firebase module(s) you're using that has the issue:
  • Are you using TypeScript?
    • N


Think react-native-firebase is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]

eggybot avatar Jul 04 '19 13:07 eggybot

As far as I know RN v0.60 has breaking change connected with integrating native packages so probably RNF 6.x will be compatible with newest version of RN.

ahanusek avatar Jul 04 '19 20:07 ahanusek

@eggybot did you find any solution to use FIREBASE 5.5.4 with RN 0.60.0 ?? I'm having this same problem with a new project I'm starting ... if I find something, I'll notice it here too!

m4v0 avatar Jul 05 '19 15:07 m4v0

RNFirebase is working on this issue refer https://github.com/invertase/react-native-firebase/issues/2194

jaskeerat789 avatar Jul 06 '19 05:07 jaskeerat789

Hi guys, I've being able to get a solution for it, all you need to do is download this file react-native.config.js from this repo https://github.com/zico4reel/React-Native-Firebase-implementation-fix and place it in the react-native-firebase directory which is inside your node_modules worked like a charm for me when I wrote it, So I felt I should share it for others as well

zico4reel avatar Jul 09 '19 11:07 zico4reel

Hey all, v5.5.5 has been published with https://github.com/invertase/react-native-firebase/pull/2335 in it which should have fixed this issue, please give it a go.

Thanks


Loving react-native-firebase and the support we provide? Please consider supporting us with any of the below:

Salakar avatar Jul 10 '19 17:07 Salakar

Correct me if I'm wrong: autolinking should add pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios' to podfile automatically, and with 5.5.5 it doesn't

oovz avatar Jul 16 '19 17:07 oovz

@fisherwise it should add/auto-link in the pod for v5.5.5

eggybot avatar Jul 16 '19 18:07 eggybot

@eggybot Thanks for reply! In my case it didn't. My steps: yarn add react-native-firebase@latest cd ios pod install Add pod 'Firebase/Core' and other modules pod install There's no pod 'RNFrebase' yarn react-native run-ios App exits when launched

edit: also configured AppDelegate.m

oovz avatar Jul 16 '19 18:07 oovz

@fisherwise did you run this command react-native link react-native-firebase?

eggybot avatar Jul 16 '19 18:07 eggybot

@eggybot no. I suppose it would be autolink. https://github.com/react-native-community/cli/blob/master/docs/autolinking.md update on my case: autolink doesn't add pod to Podfile but somehow it works

oovz avatar Jul 16 '19 18:07 oovz

did u manage to make it work with android ?

creative-git avatar Jul 27 '19 14:07 creative-git

@creative-git - posted this elsewhere - but this definitely works with RN60+Android - you can see the steps it performs https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh

mikehardy avatar Jul 28 '19 16:07 mikehardy

Still getting this ... RN60 RF5.5.4

ptupi avatar Sep 25 '19 15:09 ptupi

@ptupi closed issue, if you're still seeing the error post a new issue following the template with all information required to troubleshoot - also note that since I have posted a demo that shows it working, it can't be reproduced according to current versions and documentation, so I'd triple-check your integration to make sure everything is correct

mikehardy avatar Sep 25 '19 15:09 mikehardy

@mikehardy Thanks for the attention. I've ran: yarn add react-native-firebase Then: react-native link --verbose react-native-firebase

And this is what I've got: info Linking "react-native-firebase" iOS dependency debug Reading C:\Users\xx\Documents\xx\sanghaapp\ios\Podfile
error Linking "react-native-firebase" failed.

Any thoughts?

ptupi avatar Sep 25 '19 15:09 ptupi

Any thoughts?

Follow my advice

mikehardy avatar Sep 25 '19 15:09 mikehardy