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

466
Views
Property 'auth' does not exist on type 'typeof import..." firebase/auth
import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/database';

firebase.initializeApp(firebaseConfig);

const auth = firebase.auth();
const database = firebase.database();

This is my code but it gives me this error

Property 'auth' does not exist on type 'typeof import("[project path]/node_modules/firebase/app/dist/app/index")'.ts(2339) any

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

0

They updated the imports with v9. The fix is easy, just update to:

import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
import 'firebase/compat/firestore';

Here's the relevant section of the docs

about 4 years ago · Juan Pablo Isaza Report

0

I think this will work, even I faced the same problem Update imports to v9 compat

import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
import 'firebase/compat/database';

firebase.initializeApp(firebaseConfig);

const auth = firebase.auth();
const database = firebase.database();

Before: version 8

import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/firestore';

After: version 9 compat v9 compat packages are API compatible with v8 code

import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
import 'firebase/compat/firestore';
about 4 years ago · Juan Pablo Isaza Report

0

works for me import firebase from 'firebase/compat/app'; import 'firebase/compat/auth'; import 'firebase/compat/firestore';

relevant section of the docs

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!