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

330
Vistas
importing firebase app & messaging modules without bundling

I got stuck in this issue an entire day, I have NodeJS web chat app and using firebase for notifications the problem is I couldn't import neither firebase App module nor firebase messaging module from node_modules

import * as  messaging  from "../../../../node_modules/@firebase/messaging/dist/index.cjs.js";

and it gives me the following error

index.cjs.js:3 Uncaught ReferenceError: exports is not defined
    at index.cjs.js:3:23

may be the file that i am importing is the wrong one , if there is another file that i had to import from node_modules/@firebase please let me know

another problem when i used cdn

import * as messaging from "https://cdnjs.cloudflare.com/ajax/libs/firebase/7.14.1-0/firebase-messaging.js"

i've got the following error

TypeError: Cannot read properties of undefined (reading 'INTERNAL')
    at index.ts:41:12
    at index.ts:75:21
    at firebase-messaging.js:1:163
    at firebase-messaging.js:1:187

thanks in advance

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