Firebase: include GOOGLE_APPLICATION_CREDENTIALS json file in bundle

I’ve done that without any luck.

Sadly, I’m back to this error now when I run start:server and go to my function via local URL:

Function invocation failed: TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received type number

I had fixed this problem by adding a separate webpack config file to functions folder, but I accidently typed ‘yarn’ instead of ‘yarn build’ recently and now it’s back and I am not able to get rid of it. Deploying to netlify using the CLI gives me a different issue:

{“errorType”:“Error”,“errorMessage”:"The file at ./pgnfen2-xxx.json does not exist, or it is not a file.

Even though, if I build locally, this .json file is placed into the functions-build target folder for webpack. This is why I think the json file gets dropped.

According to the docs, I shouldn’t have to bundle the functions anymore, I can deploy them as is. If that’s the case, I can try getting rid of netlify-lambda in my builds and avoid webpack altogether and just use the Netlify Dev process.