0

While deploying the SSR Nuxt 2 to firebase with functions and hosting it throws the following error in the image Debug Error in Webapp

Firebase.js code

// import { initializeApp } from "firebase/app";
import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
require("firebase/compat/firestore");
var firebaseConfig = {
  apiKey: "",
  authDomain: "",
  projectId: "",
  storageBucket: "",
  messagingSenderId: "",
  appId: "",
  measurementId: "",
};

var fb = firebase.initializeApp(firebaseConfig);
const db = firebase.firestore();
export { fb,db };
Darren John Mathews
  • 515
  • 1
  • 5
  • 10

1 Answers1

0

As Mentioned by @kissu, the issue seems to be with the firebase version.

Try upgrading to the latest firebase version. Since lower versions of Firebase doesn't have the updated compat libraries.

And Sometimes Package managers have some issues while updating the libraries to the latest version. You can resolve these issues by reinstalling firebase or deleting and adding node_modules and package.json.

Also check this similar thread

Roopa M
  • 2,171
  • 4
  • 12