I am having trouble establishing a connection to the Firebase Realtime Database.
import { initializeApp } from "firebase/app";
// Remember to add any necessary SDKs for Firebase products
// For more information, visit: https://firebase.google.com/docs/web/setup#available-libraries
// Configuration for your web app's Firebase project
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"
};
// Intializing Firebase with the provided configuration
const app = initializeApp(firebaseConfig);
When I import 'firebase' and use app.database(), I encounter an error stating that app.database() is not a function. I also attempted importing 'firebase' specifically from 'firebase/app'.
However, when I try importing 'firebase' without specifying 'app', my terminal throws the following error:
This dependency was not found:
- firebase in ./src/main.js
To resolve this issue, you can run: npm install --save firebase Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\DumpStack.log.tmp'