Functions deploy had errors. To continue deploying other features (such as database), run:
firebase deploy --except functions
Error:
Functions did not deploy properly.
Try running deploy with --debug
. For example: firebase --debug deploy
.
In my case the function looked like this:
exports.test = functions.firestore.document('chats').onCreate((snap, context) => {
...
});
The debug log contained the following error message:
fieldViolations=[field=event_trigger, description=Expected value chats to match regular expression [^/]+/[^/]+(/[^/]+/[^/]+)*]]
And that's when I realized that chats
is not a document but a collection. I changed the path to that of the collection and everything worked fine.
EDIT:
To view more logs you can also try:
firebase functions:log
or
firebase functions:log --only <FUNCTION_NAME>
Link to documentation.
I had the same issue with Firestore ,my problem was that the path to the document was bad. I had a slash at the beginning and the end of the path to my document like I used to do with Firebase Realtime Database path. Hope it helps someone.
Just close whatever IDE you're using and then reopen it. Then on node redeploy your functions. This should resolve the issue.
I got this error as well, I had the problem that a dependency was missing in the package.json file.
By running
firebase --debug deploy
it returned an error on the user code.
firebase functions:log
gave then the specifics, that a package was not included.
I deleted yarn.lock
then error goes away. I think package-lock.json and yarn.lock should not exist together.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With