Cannot find firebase serviceKey

Error: Cannot find module ‘./fbServiceAccountKey.json’


Thanks for reaching out!

The error message…

Error: Cannot find module './fbServiceAccountKey.json'

… means that the file fbServiceAccountKey.json could not be found in the root directory of your project (whichever directory your app is starting from)

You should add this file to your repo and it will probably solve the issue you’re facing.

Jérémy, Render Support

But the file is in the repo already, in firebaseconfig folder. After the build ‘./dist/firebaseconfig’


It looks like you found the issue and that you were able to deploy your service successfully!

Jérémy, Render Support

No i didn’t (


The error I’m seeing on your service’s logs is different than the one reported in the original post.

You might be seeing “server unhealthy” error messages because your health check is failing. The health check will default to your path ( for example) if nothing else has been set. But the root path for your service doesn’t return anything but a 404.

Go to your service’s settings, scroll down and update the “Health Check” path to a valid url.

Jérémy, Render Support

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.