I am attempting to follow this guide https://firebase.google.com/docs/functions/beta/custom-events to add v2 cloud function to handle a custom event provided by firebase stripe extension. The deploy commands seems to run without errors, but my new function does not appear in cloud console.
My firebase cli version is 10.2.1
I import functionsV2 using const functionsV2 = require("firebase-functions/v2");
My function signature is like this
exports.stripetrialupdated = functionsV2
.eventarc
.onCustomEventPublished(
{
eventType: "com.stripe.v1.customer.subscription.updated",
channel:
"projects/success-academy-5eed2/locations/us-west1/channels/firebase",
region: "us-west1",
},
(event) => {...});
However, when I try to deploy using firebase deploy --only functions
, all functions except this one are deployed. My other functions are HTTP triggers and deploy fine, and all functions are in the same index.js file. There is no error message, just this function does not appear in the deploy command output. Also, running firebase deploy --only functions:stripetrialupdated
results in
i deploying functions
Running command: npm --prefix functions run lint
> functions@ lint /Users/gmiao/workspace/success-academy-5eed2/functions
> eslint .
✔ functions: Finished running predeploy script.
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
✔ functions: required API cloudfunctions.googleapis.com is enabled
✔ functions: required API cloudbuild.googleapis.com is enabled
i functions: preparing functions directory for uploading...
i functions: packaged functions (82.12 KB) for uploading
✔ functions: functions folder uploaded successfully
i functions: cleaning up build files...
✔ Deploy complete!