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

217
Views
I'm gettin error default.storage is not a function when i run my react app

I'm trying to implement adding images feature in my react project with usage of firebase storage. This is the error: Uncaught TypeError: firebase_compat_app__WEBPACK_IMPORTED_MODULE_3__.default.storage is not a function. This error occurs in firebase configuration file. I used firebase firestore in this project for adding new blogs, and I was adding images through url and everything worked just fine.

Here are my imports:

import firebase from 'firebase/compat/app';
import "firebase/storage"

And instance of storage

export const storage = firebase.storage()
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

If you are an expo user importing firebase from compat/storage solves the issue

import firebase from 'firebase/compat/app';

about 4 years ago · Juan Pablo Isaza Report

0

When using the compatibility library, make sure that all components are imported from the compatibility library.

import firebase from 'firebase/compat/app';
import "firebase/compat/storage";
//               ^^^^^^

The compatibility library is for supporting legacy code. For all new code, you should be using the modern Modular SDK because the legacy Namespaced SDK is deprecated. See the upgrade guide for details.

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!