nuxt-community / firebase-module

๐Ÿ”ฅ Easily integrate Firebase into your Nuxt project. ๐Ÿ”ฅ
https://firebase.nuxtjs.org
MIT License
641 stars 99 forks source link

Cannot read property 'config' of undefined #493

Closed polymer-coder closed 3 years ago

polymer-coder commented 3 years ago

When I run npm run generate -m I get the above captioned error.

Version

"@nuxtjs/firebase": "^7.5.0", "firebase": "^8.3.0", "nuxt": "^2.15.3",

Configuration

  modules: [

    '@nuxtjs/pwa',
    [
      '@nuxtjs/firebase',
      {
        terminateDatabasesAfterGenerate: true,
        config: {
          apiKey: "",
          authDomain: "",
          databaseURL: "",
          projectId: "",
          storageBucket: "",
          messagingSenderId: "",
          appId: "",
          measurementId: ""
        },
        services: {
          auth: true,
          firestore: {
            enablePersistence:{
              /**
               * Whether to synchronize the in-memory state of multiple tabs. Setting this
               * to 'true' in all open tabs enables shared access to local persistence,
               * shared execution of queries and latency-compensated local document updates
               * across all connected instances.
               *
               * To enable this mode, `synchronizeTabs:true` needs to be set globally in all
               * active tabs. If omitted or set to 'false', `enablePersistence()` will fail
               * in all but the first tab.
               */
              synchronizeTabs: true
            },
          },
          storage:true,
          analytics: true,
          performance: true,
          functions: true,
        }
      }
    ]
  ],

Error Logs

 Cannot read property 'config' of undefined                                                                                                14:30:23  

  at node_modules\@nuxtjs\firebase\lib\module.js:322:57
  at runMicrotasks (<anonymous>)
  at processTicksAndRejections (internal/process/task_queues.js:93:5)
  at async Nuxt.callHook (node_modules\hable\dist\hable.js:1:959)
  at async Generator.initiate (node_modules\@nuxt\generator\dist\generator.js:102:5)
  at async Generator.generate (node_modules\@nuxt\generator\dist\generator.js:71:5)
  at async generate$1 (node_modules\@nuxt\cli\dist\cli-generate.js:46:22)
  at async Object.run (node_modules\@nuxt\cli\dist\cli-generate.js:284:7)
  at async NuxtCommand.run (node_modules\@nuxt\cli\dist\cli-index.js:413:7)

   โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
   โ”‚                                                           โ”‚
   โ”‚   โœ– Nuxt Fatal Error                                      โ”‚
   โ”‚                                                           โ”‚
   โ”‚   TypeError: Cannot read property 'config' of undefined   โ”‚
   โ”‚                                                           โ”‚
   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! plant-order-form@1.0.0 generate: `nuxt generate -m`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the plant-order-form@1.0.0 generate script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\simeon.ramjit\AppData\Roaming\npm-cache\_logs\2021-03-16T18_30_23_829Z-debug.log

What is Expected?

The build succeeds

What is actually happening?

The build fails

polymer-coder commented 3 years ago

I completely removed terminateDatabasesAfterGenerate: true and the build passed. Not sure why that happens