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



  • Hey

    i’m developing a SSR project with quasar and firebase, i made a firebase file under “boot” and its called from quasr.conf.js as well but for a weird reason i get this err -

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

    you can see my code, why am i receiving that err

    tnx!!

    8fc6e45c-8329-4683-bf48-b43e3895100e-image.png

    this is the error -

    33204aca-1dd8-4dd0-ac4a-d0e85bc3894e-image.png



  • with SSRs the firebase app continues to run, thus leading to the error above. This should resolve your problem:

    if (!firebase.apps.length) { firebase.initializeApp(firebaseConfig); }

    https://github.com/vercel/next.js/issues/1999


Log in to reply