skip to Main Content

Error in Firebase Functions after deploying Nuxt 3 app + VueFire

I recently encountered this error after deploying my Nuxt app to Firebase. Error: Failed to read credentials from file service-account.json: Error: ENOENT: no such file or directory, open 'service-account.json' at .readCredentialFile ( /workspace/node_modules/firebase-admin/lib/app/credential-internal.js:507 ) at .credentialFromFile ( /workspace/node_modules/firebase-admin/lib/app/credential-internal.js:480 ) at…

VIEW QUESTION

Problem with Nuxt3 Firebase Auth Middleware

In a Nuxt3 project I am using Firebase auth. I have created the following middleware to protect not authenticated routes: export default defineNuxtRouteMiddleware((to, from) => { const { $auth } = useNuxtApp(); const { $localePath } = useNuxtApp(); if(!$auth?.currentUser?.uid){ return…

VIEW QUESTION
Back To Top
Search