Same problem here, it seems to be only related to a new function I created based on a firestore onWrite event. When I deploy without this new function, it works 100%. But whenever I include the commits related to it, it starts failing.
We have plenty of very similar functions that work fine in the repository, but somehow adding this one makes the deployment fail.
Surprisingly, setting the "--debug" flag to our CI seems to make the deployment work. I mean isn't this flag supposed to add verbose only??
We're on Node 16 and using firebase-function version ^3.23.0
Also these issues seem to be strongly related: