Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

226
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda