FIREBASE_CONFIG and GCLOUD_PROJECT environment variables are missing.
See original GitHub issueHey I’m just upgrading from the functions emulator, and trying to use the new functions framework, it appears to be working okay, but the console.logs, do not print to the console. I want to also do some testing with some admin SDK stuff but I get this error message.
FIREBASE_CONFIG and GCLOUD_PROJECT environment variables are missing.
Warning, FIREBASE_CONFIG and GCLOUD_PROJECT environment variables are missing. Initializing firebase-admin will fail
Serving function...
Function: convertTileToWebP
URL: http://localhost:8080/
Issue Analytics
- State:
- Created 4 years ago
- Comments:10
Top Results From Across the Web
Warning, FIREBASE_CONFIG environment variable is ...
js Warning, FIREBASE_CONFIG environment variable is missing. Initializing firebase-admin will fail The behavior for Date objects stored in ...
Read more >Configure your environment | Cloud Functions for Firebase
With this approach, you manually create a dotenv file for loading environment variables. Runtime environment configuration with the Firebase CLI and functions.
Read more >Using Environment Variables | Cloud Functions Documentation
Updating runtime environment variables · Open the Functions Overview page in the Google Cloud console: · Click an existing function to go to...
Read more >Node.js – Warning, FIREBASE_CONFIG environment variable ...
js Warning, FIREBASE_CONFIG environment variable is missing. Initializing firebase-admin will fail The behavior for Date objects stored in Firestore is going to ...
Read more >问答- 腾讯云开发者社区-腾讯云
... FIREBASE_CONFIG and GCLOUD_PROJECT environment variables are missing. ... FIREBASE_CONFIG: Provides the following Firebase project config info: should i ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @stot3, if you’re using Firebase SDKs, we recommend running
firebase serve
command to emulate your functions. The documentation can be found here: https://firebase.google.com/docs/functions/local-emulator. You’re getting this error because the Firebase CLI sets bothFIREBASE_CONFIG
andGCLOUD_PROJECT
env vars for your functions so that they have the needed information to work when deployed, whereas the functions framework emulator does not do this extra step.In case this helps anyone else in the future. The issue with the local emulator is with debugging.
I was able to get functions-framework working with a Firebase project by setting a GCLOUD_PROJECT environment variable. the framework will then auto-calculate the corresponding FIREBASE_CONFIG values based off the GCLOUD_PROJECT variable only.