Answers for "FirebaseError: Firebase: Firebase App named '[DEFAULT]' already exists (app/duplicate-app)."

5

Firebase: Firebase App named '[DEFAULT]' already exists

if (!firebase.apps.length) {
   firebase.initializeApp({});
}else {
   firebase.app(); // if already initialized, use that one
}
Posted by: Guest on December-16-2020
1

firebase app named default already exists react native

if (!firebase.apps.length) {
    firebase.initializeApp({});
}
Posted by: Guest on February-16-2020
1

firebaseError: Firebase: Firebase App named '[DEFAULT'] already exists (app/duplicate-app).

// Config file
import * as firebase from "firebase";

const config = {...};

export default !firebase.apps.length ? firebase.initializeApp(config) : firebase.app();

// Other file
import firebase from '../firebase';
...
console.log(firebase.name);
console.log(firebase.database());
Posted by: Guest on November-11-2020
0

Firebase: Firebase App named '[DEFAULT]' already exists (app/duplicate-app).

if (!firebase.apps.length) {
    firebase.initializeApp(firebaseConfig);
}
Posted by: Guest on March-14-2021
0

Firebase: Firebase App named '[DEFAULT]' already exists (app/duplicate-app).

// Config file
import * as firebase from "firebase";

const config = {...};

export default !firebase.apps.length ? firebase.initializeApp(config) : firebase.app();

// Other file
import firebase from '../firebase';
...
console.log(firebase.name);
Posted by: Guest on March-14-2021

Code answers related to "FirebaseError: Firebase: Firebase App named '[DEFAULT]' already exists (app/duplicate-app)."

Code answers related to "Javascript"

Browse Popular Code Answers by Language