firebase app named default aleary exists code example
Example: Firebase: Firebase App named '[DEFAULT]' already exists
if (!firebase.apps.length) {
firebase.initializeApp({});
}
if (!firebase.apps.length) {
firebase.initializeApp({});
}