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

240
Views
TypeError no detectado al importar desde firebase/database

error que estoy recibiendo:

TypeError no detectado: no se pudo resolver el especificador de módulo "firebase/database". Las referencias relativas deben comenzar con "/", "./" o "../".

estoy tratando de configurar la configuración de firebase para la última versión de firebase 9.1

 <script type="module"> import { initializeApp } from "https://www.gstatic.com/firebasejs/9.1.0/firebase-app.js"; const firebaseConfig = { apiKey: "...", authDomain: "...", databaseURL: "...", projectId: "...", storageBucket: "...", messagingSenderId: "....", appId: "..." }; // Initialize Firebase const app = initializeApp(firebaseConfig); //below import statement is causing the error import { getDatabase, ref, set } from "firebase/database"; const db = getDatabase(); </script> <script type="text/javascript" > function InsertData() { set(ref(db, 'TheStudent/'+rollV), { NameOfStudent: "abc", RollNo: 13, Section: "B", Gender: "Male" }); } document.getElementById('insertBtn').onclick = InsertData; </script>

PD. He ocultado la configuración a propósito, así que ese no es el problema.

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

0

Parece que está utilizando Firebase SDK sobre CDN, así que intente importar la base de datos de la misma manera:

 import { getDatabase, ref, set } from "https://www.gstatic.com/firebasejs/9.1.0/firebase-database.js"; // CDN URL instead of "firebase/database"
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!