If I do
cloud functions deploy --trigger-http --env-vars-file .env.yaml --region=europe-west2
.env.yaml :
runtime: nodejs10
region: europe-west2
I get this error
ERROR: (gcloud.functions.deploy) argument --region: NAME must be specified.
If I try this ➜ cloud git:(master) ✗ gcloud functions deploy --trigger-http --env-vars-file .env.yaml --region=europe-west2
I still get the same error
running the command in the root folder:
also contains src/index.js:
'use strict';
exports.http = (request, response) => {
response.status(200).send("Hello World! Let's start Typescript!!");
};
exports.event = (event, callback) => {
callback();
};
You seem to be missing the name of the function.
According to the command docs:
NAME
ID of the function or fully qualified identifier for the function. This positional must be specified if any of the other arguments in this group are specified.
Since you're specifying other arguments in that group, you should add the function name.
I'm not sure why the error talks about the region argument, but you can try to add the name and see if it works.
Also, adding --verbosity debug on the command will give you clues about what gcloud is actually understanding from your command.
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