Categories
JavaScript Answers

How to fix TypeError: firebase.storage is not a function with Node Firebase?

Spread the love

To fix TypeError: firebase.storage is not a function with Node Firebase, we import the firebase/storage module.

For instance, we write

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

firebase.initializeApp({
  //...
});
const storageRef = firebase.storage().ref();

to import the firebase/storage module with

import "firebase/storage";

Then we can call firebase.storage.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *