export default (imported as firebase) was not found in firebase-app

463

export 'default' (imported as 'firebase') was not found in 'firebase/app' -

// According to the documentation, Apps currently using Firebase Web SDK
// version 8 or earlier should consider migrating to version 9 as follows:

// v9 compat packages are API compatible with v8 code
import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
import 'firebase/compat/firestore';

"export 'default' (imported as 'firebase') was not found in 'firebase/app' -

//to use firebase app
import firebase from 'firebase/app'; //older version
import firebase from 'firebase/compat/app'; //v9

//to use auth
import 'firebase/auth'; //older version
import 'firebase/compat/auth'; //v9

//to use firestore
import 'firebase/firestore'; //Older Version
import 'firebase/compat/firestore'; //v9

"export 'default' (imported as 'firebase') was not found in 'firebase/app' -

import { initializeApp } from 'firebase/app';

// TODO: Replace the following with your app's Firebase project
configuration const firebaseConfig = {   //... };

const app = initializeApp(firebaseConfig);

Comments

Submit
0 Comments