相关疑难解决方法(0)

Firebase Modular SDK V9.0.0+ TypeError:无法读取未定义的 firebase 属性“apps”

我在尝试运行 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)

javascript firebase next.js

8
推荐指数
1
解决办法
5931
查看次数

标签 统计

firebase ×1

javascript ×1

next.js ×1