Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to firebase 9.0.0^ #190

Open
harry-herskowitz opened this issue Sep 13, 2021 · 12 comments
Open

upgrade to firebase 9.0.0^ #190

harry-herskowitz opened this issue Sep 13, 2021 · 12 comments

Comments

@harry-herskowitz
Copy link

npm ERR! dev firebase@"^9.0.2" from the root project
npm ERR! Could not resolve dependency:
npm ERR! peer firebase@"^8.3.0" from [email protected]

@RonMell
Copy link

RonMell commented Sep 13, 2021

Hi, I have exactly the same issue.
Any idea when this could be fixed?

Thanks!

@harry-herskowitz
Copy link
Author

you can do a --force like it says in the prompt and see if it works

@RonMell
Copy link

RonMell commented Sep 13, 2021

I'm going to work on differents features of my project, waiting for an update of this plugin, but I might try the --force option indeed.
Did you?

@harry-herskowitz
Copy link
Author

nope! I went the same route haha. Good luck!

@RonMell
Copy link

RonMell commented Sep 13, 2021

Haha you too mate!

@peterqyoung
Copy link

peterqyoung commented Sep 16, 2021

Maybe there's a way to use the firebase 'compat' API to speed things along? https://firebase.google.com/docs/web/modular-upgrade#about_the_compat_libraries. Just as a bit of context, I'm also looking to use this package in my firebase v9 app.

@RonMell
Copy link

RonMell commented Sep 16, 2021

Yes, maybe changing all the imports from 'firebase/auth' to 'firebase/compat/auth' would be a temporary solution

@harry-herskowitz
Copy link
Author

Have you checked out this repo? https://github.com/robingenz/capacitor-firebase-authentication

@RonMell
Copy link

RonMell commented Sep 17, 2021

Yes I've tried signing in with Apple and Google with this plugin but neither worked

@mike-cao
Copy link

For anyone needing an immediate solution, what I did was manually updated all the firebase imports in capacitor-firebase-auth in my node_modules to use the firebase/compat/* APIs. Afterwards, I ran npx patch-package capacitor-firebase-auth to generate a diff that is used to patch this package automatically any time npm install is ran. In my package.json scripts, I have a postinstall script that executes npx patch-package. This has allowed me to update to the latest firebase sdk. I expect to be able to remove this band-aid once an official update that supports firebase 9 is released. In the meantime, hope this solution helps some of you who are in the same boat as me! https://github.com/ds300/patch-package

@anandsathe67
Copy link

anandsathe67 commented Nov 19, 2021

See PR #199 which I just reviewed. Note the link I mentioned in the comment https://harryherskowitz.com/2021/08/23/firebase-capacitor.html
This solves firebase/firebase-js-sdk#5019 which you will run into if you are using this plugin for an iOS app.

@anandsathe67
Copy link

Just to be safe - I uploaded my changes (which have been tested and used in my app) as a PR #204. Changes are pretty much the same as in #199
@baumblatt FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants