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

378
Views
Firebase Error(only dev): ReferenceError: IDBIndex is not defined

When I build my app for production everything works fine but in development I'm getting this error when I'm trying to import collection and addDoc from firestore. I've read that the problem is related to vite grabbing Firebase's browser (esm) bundle and not the Node bundle. I have tried to fix this by adding a vite.config.js file with the following content but nothing changed:

import { defineConfig } from 'vite';
import path from 'path';

// vite.config.js
export default defineConfig({
  // config options
  resolve: {  
    alias: {
        ['firebase/firestore']: path.resolve(__dirname, 'node_modules/firebase/firestore/dist/firestore/index.d.ts')
  },extensions: ['.ts', '.js'] },
})
about 4 years ago · Santiago Gelvez
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!