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
Note: For version 9 it's required to compat/app otherwise showing error also
firebase.js file `import firebase from "firebase/compat/app"; import "firebase/compat/auth";
const app = 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_PROJECT_ID ,
storageBucket:process.env.REACT_APP_FIREBASE_STORAGE_BUCKET ,
messagingSenderId:process.env.REACT_APP_FIREBASE_MESSAGING_SENDER_ID ,
appId:process.env.REACT_APP_FIREBASE_APP_ID ,
measurementId:process.env.REACT_APP_FIREBASE_MEASUREMENT_ID })
export const auth = app.auth(); export default app; ` .env.local file:
`REACT_APP_FIREBASE_API_KEY =*************
REACT_APP_FIREBASE_AUTH_DOMAIN=************* REACT_APP_FIREBASE_DATABASE_URL =*************
REACT_APP_FIREBASE_PROJECT_ID =*************** REACT_APP_FIREBASE_STORAGE_BUCKET =***************** REACT_APP_FIREBASE_MESSAGING_SENDER_ID =***************** REACT_APP_FIREBASE_APP_ID =******************* REACT_APP_FIREBASE_MEASUREMENT_ID =*******************`
The text was updated successfully, but these errors were encountered:
Still not working
Sorry, something went wrong.
No, still not working. I tried other ways to fixed it but nothing works.
I tried this way and it works for me.
const firebaseConfig = { apiKey: `${process.env.API_KEY}`, authDomain: `${process.env.AUTH_DOMAIN}`, projectId: `${process.env.PROJECT_ID}`, storageBucket: `${process.env.STORAGE_BUCKET}`, messagingSenderId: `${process.env.MESSAGING_SENDER_ID}`, appId: `${process.env.APP_ID }` }; // Initialize Firebase const app = firebase.initializeApp(firebaseConfig)
No branches or pull requests
Note: For version 9 it's required to compat/app otherwise showing error also
firebase.js file
`import firebase from "firebase/compat/app";
import "firebase/compat/auth";
const app = 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_PROJECT_ID ,
storageBucket:process.env.REACT_APP_FIREBASE_STORAGE_BUCKET ,
messagingSenderId:process.env.REACT_APP_FIREBASE_MESSAGING_SENDER_ID ,
appId:process.env.REACT_APP_FIREBASE_APP_ID ,
measurementId:process.env.REACT_APP_FIREBASE_MEASUREMENT_ID
})
export const auth = app.auth();
export default app;
`
.env.local file:
`REACT_APP_FIREBASE_API_KEY =*************
REACT_APP_FIREBASE_AUTH_DOMAIN=*************
REACT_APP_FIREBASE_DATABASE_URL =*************
REACT_APP_FIREBASE_PROJECT_ID =***************
REACT_APP_FIREBASE_STORAGE_BUCKET =*****************
REACT_APP_FIREBASE_MESSAGING_SENDER_ID =*****************
REACT_APP_FIREBASE_APP_ID =*******************
REACT_APP_FIREBASE_MEASUREMENT_ID =*******************`
The text was updated successfully, but these errors were encountered: