Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

190
Views
'Cannot read property 'apps' of undefined' in nuxtJs/ firebase

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

enter image description here

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

enter image description here

so whats the solution to solve the above error? Thanks in advance

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

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.

about 4 years ago · Juan Pablo Isaza Report

0

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}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!