Closed felipej26 closed 1 year ago
This issue does not seem to follow the issue template. Make sure you provide all the required information.
I suddenly get the same error message since yesterday.
I upgraded nvm to node 18 to try if that is working, but it didnt work either, normally im working on node 16.
Hey @felipej26, thanks for providing code snippets and debug logs. It looks like the cause of the error is because you didn’t initialize a default app, since matchesApp
is an instance of an app with the name of “matches” and queuesApp
is an instance of an app with the name of “queues”.
From what I can tell, you are accessing the Firestore service for the App matchesApp
which has the name of “matches”. To do this, could you try changing:
const firestore = getFirestore();
To
const firestore = getFirestore(matchesApp);
Thanks @sanderschnydrig for sharing your debug logs. I’m thinking that the cause of the error in your case is that there is a runtime or syntax error with your code that is preventing the Firebase CLI from analyzing your functions.
Could you provide a sample code snippet where the issue is reproducible?
[REQUIRED] Environment info
firebase-tools: emulator
Platform: functions
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
I want to connect my functions with the realtime database and cloud firestore.
[REQUIRED] Actual behavior
When I run the command
firebase emulators:start
I get the message:⬢ functions: Failed to load function definition from source: FirebaseError: Functions codebase could not be analyzed successfully. It may have a syntax or runtime error
firebase-debug.log:
firebase-debug.log