You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
Just a tiny issue that I ran into and failed to find solutions online. I tried deploying my code to Vercel and during build time, this is the error:
type: 'FirebaseAppError',
errorInfo: {
code: 'app/invalid-credential',
message: 'Service account object must contain a string "project_id" property.'
},
In my firebase.js and firebase-admin.js, I have set the projectId and project_id respectively.
I have also included the environment variables in .env, .env.local and Vercel environment variable settings.
The text was updated successfully, but these errors were encountered:
Are those values set to environment variables? If so, you'll need to ensure you add the environment variables inside your Vercel project as well – for both the preview and production environments.
Hey @leerob, I replaced all the API keys on Vercel again to make sure there's no mistake.
After that, I ran into an error: Error: Failed to parse private key: Error: Invalid PEM formatted message.
To fix it, I added this to firebase-admin.js: private_key: process.env.FIREBASE_PRIVATE_KEY.replace(/\\n/g, '\n'),
Hi @leerob! I love your React 2025 course 👍
Just a tiny issue that I ran into and failed to find solutions online. I tried deploying my code to Vercel and during build time, this is the error:
In my
firebase.js
andfirebase-admin.js
, I have set theprojectId
andproject_id
respectively.I have also included the environment variables in
.env
,.env.local
and Vercel environment variable settings.The text was updated successfully, but these errors were encountered: