Firebase functions work intermittently due to the error: 'Failed to load function definition from source: FirebaseError: User code failed to load.' #6740
Description
Hi,
When I run the command firebase serve -o 0.0.0.0 it sometimes work, sometimes does not.
serve-fails.txt
Similarly, when I run the command firebase emulators:start --only "functions,hosting
emulate-fails.txt
The error does not say much:"!! functions: Failed to load function definition from source: FirebaseError: User code failed to load. Cannot determine backend specification"
I can assure you I do nothing between running the commands. Even if it works at a time, it may not the second time.
The error is very annoying, unpredictable and breaks our whole deployment. It can fail over and over multiple times and hence we cannot update our product.
- Does anyfile inside the "functions/lib" folder change after running the above commands?
- Do these commands have side-effects?
- Why the "--debug" mode does not reveal any more information and how can I find more information?
My environment:
nodejs: 18.16.1
firebase-tools: 13.1.0
windows: Windows 11 Home Single Language; version=22H2
Activity