firebasefirebase-realtime-databasegoogle-cloud-firestoregoogle-cloud-functionsfirebase-cloud-messaging

What causes typescript compile error when deploying


I roughly following this tutorial to make a cloud function with typescript. It works fine in development, but when I try to deploy it (firebase deploy --only functions), I get A LOT of typescript errors. I have no idea why. It works in dev, why can't I push the same set up to Firebase?


Solution

  • Follow the below steps for a successful cloud functions deployment:

    curl https://REGION-PROJECT_ID.cloudfunctions.net/FUNCTION_NAME \ -H "Authorization: bearer $(gcloud auth print-identity-token)"