-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nuxt/firebase + Vercel SSR? #321
Comments
Hey @cfofiu, can you share your firebase options? Only options like "services", etc., not the private config. Also do you have any |
@sergiocerrutti this is really it (from modules: [
'@nuxtjs/firebase',
],
// Firebase module
firebase: {
config: {
apiKey: process.env.firestore_apikey,
authDomain: fbConfig.firestore_authDomain,
databaseURL: fbConfig.firestore_databaseURL,
projectId: fbConfig.firestore_projectId,
storageBucket: fbConfig.firestore_storageBucket,
messagingSenderId: fbConfig.firestore_messagingSenderId,
appId: fbConfig.app_id,
measurementId: fbConfig.messaging_sender_id
},
services: {
auth: true,
firestore: true,
functions: true,
storage: true
}
},
functions: {
location: 'us-central1',
emulatorPort: 12345
}, and the {
"version": 2,
"rewrites": [
{ "source": "/strategy/:shareId", "destination": "/" },
{ "source": "/property/:profileId", "destination": "/" },
],
"trailingSlash": false,
"regions": ["iad"]
} If you happen to have a working sample for Firebase Nuxt SSR deployment that you can share, I could try to figure out what I'm doing wrong. |
Hey @cfofiu, sorry for the delay, I'm really busy these days... Here is my {
"version": 2,
"builds": [
{
"src": "nuxt.config.js",
"use": "@nuxtjs/now-builder",
"config": {
"serverFiles": [
"middleware/**",
"plugins/**",
"lib/**",
"package.json"
]
}
}
],
"routes": [
{
"src": "/_nuxt/.+",
"headers": {
"cache-control": "s-maxage=31536000"
}
},
{
"src": "/(.*)",
"dest": "$1"
}
]
} Also my Vercel build config is set to Nuxt.js, but I think this is overridden by the My Firebase config inside ['@nuxtjs/firebase', {
config: {
...
},
services: {
auth: {
initialize: {
onAuthStateChangedAction: 'auth/onAuthStateChanged'
},
ssr: true
},
firestore: {
memoryOnly: false
},
storage: true
}
}] Try to add |
Hey! Did you find any solutions to this? I'm facing the same issue with Firebase and confused where it's coming from. |
I never used vercel, but I just stumbled upon that: Since Not tested, but just an idea. |
Closing due to inactivity. |
Having the same issue #557 @cfofiu Did you find any solution for this? |
Here is a workaround
|
I've been trying to deploy my Nuxt SSR app build with nuxt/firebase on Vercel and it keeps throwing the following errors:
WARN Error enabling offline persistence. Falling back to persistence disabled: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
The text was updated successfully, but these errors were encountered: