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;
    
```
CC BY-SA 4.0
2020-10-14T02:41:03.643
71180
2021-01-28T12:42:13.387
2020-11-10T09:52:00.460
32986
42308
question
reactjs firebase next.js
Next.jsでfirebase.storage()エラー firebase.storage is not a function
import "firebase/storage";  
こちらがないからだと思います。
CC BY-SA 4.0
2021-01-28T12:42:13.387
73655
2021-01-28T12:42:13.387
43719
71180
answer