Umair Malik
Umair Malik

Reputation: 35

Functions did not deploy properly

I am a bit new in cloud functions stuff and trying to deploy my website on firebase but getting this error while deploying cloud functions.

!  functions[sendMail(us-central1)]: Deployment error.
Function failed on loading user code. Error message: Error: please examine your function logs to see the error cause: https://cloud.google.com/functions/docs/monitoring/logging#viewing_logs
!  functions[app(us-central1)]: Deployment error.
Function failed on loading user code. Error message: Error: please examine your function logs to see the error cause: https://cloud.google.com/functions/docs/monitoring/logging#viewing_logs
Error: Functions did not deploy properly.

these functions are working fine on localhost as well

Upvotes: 0

Views: 2306

Answers (2)

Abraham
Abraham

Reputation: 15630

You can examine the issue by viewing the log

firebase functions:log

The specific issue will be visible there. I sometimes had error as simple as a missing package



another time the logs didn't help and I found the problem to be that I had disabled billing for the project for debugging.

It then worked fine after I enabled it in the Google cloud console.

It would have been really helpful if firebase could show any useful error message to suggest the problem. I found this after wasting time on many trials.

Upvotes: 2

sllopis
sllopis

Reputation: 2368

From the comments above:

The issue was that the package.json and package-lock.json were not correctly synchronized.

Upvotes: 3

Related Questions