Reactでfirebase.storage()を使うことはできたのですが(firebase7.20.0), Next.jsで同じコードを書いたのにfirebase.storage is not a function のエラーメッセージが出てしまいます.
何が原因なのでしょうか.
firebase 7.23.0
import firebase from "firebase";
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
// config
};
const firebaseApp = !firebase.apps.length
? firebase.initializeApp(firebaseConfig)
: firebase.app();
const db = firebaseApp.firestore();
const auth = firebase.auth();
const provider = new firebase.auth.GoogleAuthProvider();
const storage = firebaseApp.storage()
export { auth, provider, storage };
export default db;