Open Nicolooo opened 2 years ago
Yeah the issue for me is around the firebase init section... looks like they changed a lot around that in V9. Here is a somewhat useful link I found in the mean time (if you have typescript setup) Firebase With Next.js in V9
I am new to Fireship and this is my first project. Great content and explanations from Jeff, but with everything he has out it has to be tough to manage all the updates. Best to match up your dependencies with his by copying this repo's package.json when you start. Your app will be a little behind, but for the purpose of learning about Firebase it is more than sufficient :)
I've found out that the easiest way to make codes from firbase.js works is that
import firebase from 'firebase/compat/app'; import 'firebase/compat/auth'; import 'firebase/compat/firestore'; import 'firebase/compat/storage';
using "firebase/compat/" instead of "firebase/".
Since firebase v9 package has a compatible sub pack for v8, you don't need to downgrade or reinstall firebase@8
@shanliangc Thank you for the answer.
hello, this code is not working on firebase v9. can you somehow update the code to fit the needs of the new firebase? thanks in advance, Nick