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