I have a firebase project using Javascript (not TypeScript), but have started getting the error when trying to run a functions emulator
$ firebase emulators:start --only functions
⚠ functions: Cannot find module './tsconfig.json'
⚠ Your function was killed because it raised an unhandled error.
What gives? Why would my javascript application suddenly start requiring a typescript configuration? What should this file contain?
I started getting this error when upgrading firebase-tools
from v7.11.0 to v8.4.2.
I tried running firebase init
on the project again thinking the new tools might set some missing configuration when I choose Javascript over Typescript, but it had no affect.
I had a similar issue with a similar setup. I created a file name tsconfig.json with the contents {}
and was then given the real issue (await is only valid in async function).
I'm guessing there's something in the error handling that's trying to look at tsconfig.json when it shouldn't.