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

255
Views
SvelteKit-Firebase auth with firebase google auth code not working
import { firebase, initializeApp } from 'firebase/app'
import { GoogleAuthProvider } from 'firebase/auth'
import 'firebase/auth'

const firebaseConfig = {
    apiKey: "xxx",
    authDomain: "xxx",
    databaseURL: "xxx",
    projectId: "xxx",
    storageBucket: "xxx",
    messagingSenderId: "xxx",
    appId: "xxx",
    measurementId: "xxx"
  };


firebase.initializeApp(firebaseConfig);

export const auth = firebase.auth();
const provider = new GoogleAuthProvider();

The code I have written is to implement google authentication in my web app. But it isn't working. It is throwing the error:

The requested module '/node_modules/.vite/firebase_app.js?v=e56c4a7d' does not provide an export named 'firebase'
SyntaxError: The requested module '/node_modules/.vite/firebase_app.js?v=e56c4a7d' does not provide an export named 'firebase'
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You are using Firebase Modular SDK but also using the name-spaced syntax. Try refactoring the code as shown below:

import { firebase, initializeApp } from 'firebase/app'
import { getAuth, GoogleAuthProvider } from 'firebase/auth'

const firebaseConfig = {...};

const app = initializeApp(firebaseConfig);

const provider = new GoogleAuthProvider();
export const auth = getAuth(app);

The documentation has examples with both the syntaxes.

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!