Skip to content
Discussion options

You must be logged in to vote

The problem is with your firebase.js Since the var app can't be used for retrieving the data. You must declare a const variable to firebaseApp and since you can't export two default variables I will suggest you to declare a constant variable and use that in your main code. So after changing all this stuffs your firebase.js should look like this

import firebase from "firebase/app"
import "firebase/auth"
import "firebase/firestore";

const firebaseApp = firebase.initializeApp({
  apiKey: process.env.REACT_APP_FIREBASE_API_KEY,
  authDomain: process.env.REACT_APP_FIREBASE_AUTH_DOMAIN,
  databaseURL: process.env.REACT_APP_FIREBASE_DATABASE_URL,
  projectId: process.env.REACT_APP_FIREBASE_PROJ…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by arrullin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Search and Navigation Search, navigate, and understand code on GitHub
2 participants