I have tried to integrate firebase with Nuxt Js and i am getting this error

As per documentation first I have installed firebase with help of "npm install firebase" and then i have installed "npm install @nuxtjs/firebase" and third i have integrated my firebase config in modules in nuxt.config.js

so whats the solution to solve the above error? Thanks in advance
It depends on which version of @nuxtjs/firebase you are using, because this package @nuxtjs/firebase is not compatible with firebase version 9+ supporting tree-shaking.
So you need to downgrade you package to firebase version 8 and prior.
For more information, please check the authors github issues.
If you are using the new Modular SDK v9.0.1 you might get the above error as it does not use firebase. namespace now,
Try using getApps() instead of firebase.apps.
import { initializeApp, getApps } from "firebase/app"
import { getFirestore } from "firebase/firestore"
import { getAuth } from "firebase/auth"
const firebaseConfig = {...}
if (!getApps().length) {
//....
}
const app = initializeApp(firebaseConfig)
const db = getFirestore(app)
const auth = getAuth(app) export {db, auth}