Nuxt SSR With Firebase Integration
Solution 1:
So this is quite old, but I happened to stumble across the same issue just a few days ago, so maybe this can help you or someone else in the future.
To my understanding, this issue is caused due to the vue
module, which is a dependency of Nuxt, being installed inside the functions folder. When you run Nuxt with the buildDir
set to functions/.nuxt
and import Vue from 'vue'
in your plugins, you get another Vue-class than the one being used by Nuxt. This is a bug in Nuxt, as far as I know.
How to hotfix this:
- Remove the
nuxt
andvue
modules from yournode_modules
inside thefunctions
directory, all will run regardless. - You will need to reinstall the modules before deploying to Firebase, if you use any of these modules in your Firebase Functions.
Solution 2:
Metaphalo's answer works for me, to this I wanted to add that if you have a srcDir: 'src' in which all the nuxt directories are, I recommend adding.
nuxt.config
srcDir: 'src',
buildDir: process.env.NODE_ENV === 'production' ? 'functions/.nuxt' : '.nuxt',
so you can use the plogins in dev
Post a Comment for "Nuxt SSR With Firebase Integration"