We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HI, I have done the steps below but run into the following error when I try to sign in or register.
Firebase: Firebase App named '[DEFAULT]' already exists (app/duplicate-app). ▶ 2 stack frames were collapsed. new Firebase C:/Users/arhoy/OneDrive/Desktop/web-development/playground/gatsby/react-gatsby-firebase-authentication/src/components/Firebase/firebase.js:76 73 | } 74 | 75 | // merge auth and db user > 76 | authUser = { 77 | uid: authUser.uid, 78 | email: authUser.email, 79 | emailVerified: authUser.emailVerified, View compiled getFirebase C:/Users/arhoy/OneDrive/Desktop/web-development/playground/gatsby/react-gatsby-firebase-authentication/src/components/Firebase/firebase.js:104 101 | messages = () => this.db.ref('messages'); 102 | } 103 | > 104 | let firebase; 105 | 106 | function getFirebase(app, auth, database) { 107 | if (!firebase) { View compiled (anonymous function) C:/Users/arhoy/OneDrive/Desktop/web-development/playground/gatsby/react-gatsby-firebase-authentication/src/components/layout.js:1 > 1 | import React, { Component, Fragment } from 'react'; 2 | 3 | import Navigation from './Navigation'; 4 | import getFirebase, { FirebaseContext } from './Firebase';
I am not sure what I am doing wrong, I have set up my ENV variables from Firebase and all that.
Thank you
The text was updated successfully, but these errors were encountered:
@arhoy Did you find a solution ? I am facing the same issue.
Sorry, something went wrong.
I had the same problem.
I created two files with the firebase credentials for prod/dev
I run gatsby develop and the app crashed with the previous error.
If you open the gatsby-config file you will see that it has this code in it
require("dotenv").config({ path: `.env.${process.env.NODE_ENV}`, })
That means that you have to pass a NODE_ENV before the gatsby develop command like that:
NODE_ENV=development gatsby develop (for development) NODE_ENV=production gatsby develop (for production)
NODE_ENV=development gatsby develop
NODE_ENV=production gatsby develop
In this way, it takes the NODE_ENV variable that you pass and it uses the correct env variables from .env.* files.
I believe that you can close the issue or maybe we can update the documentation accordingly to make it more clear?
It works on-the-shelf if you put the credentials in .env
.env
I am experiencing the same problem with Firebase and Gatsby, not just this package. I would guess it has something to do with versioning.
No branches or pull requests
HI, I have done the steps below but run into the following error when I try to sign in or register.
I am not sure what I am doing wrong, I have set up my ENV variables from Firebase and all that.
Thank you
The text was updated successfully, but these errors were encountered: