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
.