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

329
Views
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
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!