我在尝试运行 next.js 应用程序时遇到此错误。我尝试了很多方法但无法解决这个问题。我正在使用 firebase 9.0.1
Server Error
TypeError: Cannot read property 'apps' of undefined
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Source
.next\server\pages\_app.js (14:13) @ Object../firebase.js
12 | };
13 |
> 14 | const app = !firebase.apps.length
| ^
15 | ? firebase.initializeApp(firebaseConfig)
16 | : firebase.app();
Run Code Online (Sandbox Code Playgroud)
这是我的 firebase.js
Server Error
TypeError: Cannot read property 'apps' of undefined
This error happened while generating the page. Any console logs will …Run Code Online (Sandbox Code Playgroud)