Firebase cloud function deploy error

Try this

You can fix the issue much easier by examining the actual logs using this command to open the log

firebase functions:log

The specific issue will be visible there. I sometimes even had errors as simple as a missing package in package.json


You can temporarily rename your function:

$ firebase deploy --only functions

...

i functions: deleting function onSameDataChanged...

i functions: creating function onSameDataChanged1...

...

✔ functions: all functions deployed successfully!

✔ Deploy complete!


Go to Google cloud functions console and see if there is red exclamation mark against your function. Then select that particular function and try to delete. once it gets deleted from there, you can deploy again successfully. if it is showing spinner, then wait till it shows red mark.