Hey there 👋🏼 thanks for building this library!
I'm struggling to get everything to work with a brand new refine project.
I get the error:
Error: Component auth has not been registered yet
This is my firebase.ts file:
import {
initializeFirebase,
FirebaseAuth,
FirebaseDatabase,
FirestoreDatabase
} from "refine-firebase";
export const firebaseConfig = {
apiKey: "xxx",
authDomain: "xxx",
projectId: "xxx",
storageBucket: "xxx",
messagingSenderId: "xxx",
appId: "xxx",
measurementId: "xxx"
};
export const firebaseApp = initializeFirebase(firebaseConfig);
export const firebaseAuth = new FirebaseAuth(undefined, firebaseApp);
export const firestoreDatabase = new FirestoreDatabase({firebaseApp});
export const firebaseDatabase = new FirebaseDatabase({firebaseApp});
this is the intialization in _app.tsx:
dataProvider={firestoreDatabase.getDataProvider() as any}
authProvider={firebaseAuth.getAuthProvider()}
I tried a few other scenarios:
- initializing without configs
- initializing with
initializeApp directly from firebase
- removed and re-installed node_modules (as proposed here)
but nothing worked. Any advice?
Hey there 👋🏼 thanks for building this library!
I'm struggling to get everything to work with a brand new refine project.
I get the error:
Error: Component auth has not been registered yetThis is my
firebase.tsfile:this is the intialization in
_app.tsx:I tried a few other scenarios:
initializeAppdirectly from firebasebut nothing worked. Any advice?