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

201
Views
I cannot connect Firebase Realtime Database in Vue.js

I am trying to connect to Firebase Realtime Database, but I cannot.

import { initializeApp } from "firebase/app";
// Import the functions you need from the SDKs you need
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries

// Your web app's Firebase configuration
const firebaseConfig = {
  apiKey: "AIzaSyDDQLlluO4FusOQ8ucJvD_svdMJE5dkOlw",
  authDomain: "portfolio-4dd8c.firebaseapp.com",
  databaseURL: "https://portfolio-4dd8c-default-rtdb.europe-west1.firebasedatabase.app",
  projectId: "portfolio-4dd8c",
  storageBucket: "portfolio-4dd8c.appspot.com",
  messagingSenderId: "237808071168",
  appId: "1:237808071168:web:006dc98a6c3272fbd39ee5"
};
 
// Initialize Firebase
const app = initializeApp(firebaseConfig);

I import firebase from 'firebase' and app.database(), but it give me an error (app.database() is not a function). I also tried import firebase from 'firebase/app'

when I write this import firebase from 'firebase', terminal gives me error below:

This dependency was not found:

  • firebase in ./src/main.js

To install it, you can run: npm install --save firebase Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\DumpStack.log.tmp'

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

0

You need to import getDatabase to get a Database instance using Modular SDK:

import { initializeApp } from "firebase/app"
import { getDatabase } from "firebase/database"

const app = initializeApp({...config})

const db = getDatabase(app)

export { db }
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!