Server Error
TypeError: Cannot read property 'INTERNAL' of undefined
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
Ke
file:///D:/whatsapp/whatsappclone/node_modules/@firebase/auth/dist/auth.js (125:129)
new Ze
file:///D:/whatsapp/whatsappclone/node_modules/@firebase/auth/dist/auth.js (131:288)
<unknown>
file:///D:/whatsapp/whatsappclone/node_modules/@firebase/auth/dist/auth.js (237:277)
Object.<anonymous>
file:///D:/whatsapp/whatsappclone/node_modules/@firebase/auth/dist/auth.js (433:462)
Module._compile
internal/modules/cjs/loader.js (1063:30)
Object.Module._extensions..js
internal/modules/cjs/loader.js (1092:10)
Module.load
internal/modules/cjs/loader.js (928:32)
Function.Module._load
internal/modules/cjs/loader.js (769:14)
Module.require
internal/modules/cjs/loader.js (952:19)
require
internal/modules/cjs/helpers.js (88:18)
I am getting this error when trying to use firebase in my react app. This is my firebase.js
import firebase from "firebase";
const firebaseConfig = {
// Config is here
};
const app = !firebase.apps.length
? firebase.initializeApp(firebaseConfig)
: firebase.app();
const db = app.firestore();
const auth = app.auth();
const provider = new firebase.auth.GoogleAuthProvider();
export {db , auth , provider};
I have encountered this type of error for the first time. I have no idea why is it coming. Any type of help will be appreciated.