Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

359
Vistas
Linking VS Code to Firebase: module error

I've got what I think is a really simple issue here when trying to link my firebase to my VS code. I'm getting the following error in the console when running my index.html on my local server:

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

This is my HTML:

<!DOCTYPE html>

  
    
    HUT
  

   
    

      // Initialize Cloud Firestore through Firebase
      import { initializeApp } from "../firebase/app"
      import { getFirestore } from "../firebase/firestore"
      const firebaseApp = initializeApp({
      apiKey: '',
      authDomain: '',
      projectId: ''
      });
    
      const db = getFirestore();  
    
    </script>

So I've added type="module" to my script tag and also tried running this in a separate index.js file also adding type="module" but I still get the error. I'm sure this is really simple but any help would be really appreciated as I'm super stuck here and can't move past it!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda