LoginSignup
0
0

More than 3 years have passed since last update.

Nuxt × firebaseでReferenceError: navigator is not defined

Posted at

Nuxtでfirebaseを使用しているときに、nuxt generateしたときに発生したエラー

ERROR   /form                                                                                                                                16:10:10

ReferenceError: navigator is not defined

解決策

firebase.js
if (typeof window !== 'undefined' && firebase.apps.length === 0) {
  firebase.initializeApp(config)
  firebase.analytics()
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0