2020-11-17T04:00:24.347488828Z Step #4 - "builder": === Node.js - Functions Framework ([email protected]) === I
2020-11-17T04:00:24.347877926Z Step #4 - "builder": Failure: (ID: 7485c5b6) function.js does not exist I
I run into the above error because I try to deploy a Firebase Cloud Function via gcloud
tool (where firebase
tool should be used instead).
const functions = require('firebase-functions');exports.hello = functions.https.onRequest((req, res) => { res.send(`Hello ${req.query.name}`);});
This will produce the error
gcloud functions deploy hello --runtime nodejs10 --trigger-http --allow-unauthenticated
Use this instead
firebase deploy --only functions:hello