3

While running firebase emulators:start, I get this error 70% of the time:

!!  functions: Failed to load function definition from source: FirebaseError: User code failed to load. Cannot determine backend specification

But for some reason, restarting firebase emulator seems to fix that error temporarily - which leads me to believe it's not an issue with code or dependencies but more of something related to firebase emulator itself.

Any help would be appreciated.

OS & Firebase Details:

  • OS: Windows 11 (22H2)
  • Node Version: 18
  • Firebase CLI Version: 11.18.0
  • Firebase dependencies:
"firebase": "^9.16.0",
"firebase-admin": "^10.0.1",
"firebase-functions": "^4.2.0",
"firebase-tools": "^11.18.0",
Light Yagami
  • 481
  • 4
  • 7
  • Getting the same but when deploying the functions. – Henrik Bøgelund Lavstsen Mar 12 '23 at 13:13
  • Are you running this in WSL by any chance? – Michael B Apr 17 '23 at 10:47
  • @MichaelB Nope - running it in windows (powershell terminal) – Light Yagami Apr 22 '23 at 23:49
  • @LightYagami I had the same error message when I started the emulator from WSL, with the emulator files being in the Windows file system. I guess it has something to do with file watchers or such. It works for me 100% of the time if started in WSL with the files in WSL file system, and also 100% if running from Windows (cmd) with the files being in the Windows file system. Just letting you know cause maybe you have the emulator files somewhere with some restrictions on what that particular file system can do (external drive, network mapped, not NTFS etc) - maybe it helps. Good luck! – Michael B May 04 '23 at 09:54

0 Answers0