Jeb50
Jeb50

Reputation: 7037

(gcloud.functions.deploy) unrecognized arguments: --runtime did you mean --timeout

Following this Google OCR Tutorial, deploying functions, Node.js step 1 To deploy the image processing function with a Cloud Storage trigger, run the following command in the app directory:

gcloud functions deploy ocr-extract --runtime nodejs6 --trigger-bucket My_IMAGE_BUCKET_NAME --entry-point MyprocessImage

getting

ERROR: (gcloud.functions.deploy) unrecognized arguments: --runtime (did you mean '--timeout'?)

Node version 10 VS Code 1.17.2 Windows 10

Upvotes: 2

Views: 9892

Answers (2)

vladkras
vladkras

Reputation: 17228

I had a default installation with apt-get and I can't figure out how to 1. upgrade it and 2. stop "You cannot perform this action because the Cloud SDK component manager is managed by an external package manager" error.

So I removed it completely with

sudo apt-get remove google-cloud-sdk

and installed interactivelly

curl https://sdk.cloud.google.com | bash

now all beta commands work fine

Upvotes: 3

LundinCast
LundinCast

Reputation: 9810

UPDATE: As of Aug 28th, 2018 and the release of the Cloud SDK version 214.0.0, the --runtime flag has been promoted to GA and the beta command isn't needed anymore.


The --runtime flag was added in Cloud SDK version 208.0.0, in beta only so far. I've requested to update the tutorial you linked in the documentation.

Check that you have Cloud SDK >= 208.0.0 and run this command instead:

gcloud beta functions deploy ocr-extract --runtime nodejs6 --trigger-bucket My_IMAGE_BUCKET_NAME --entry-point MyprocessImage

Upvotes: 5

Related Questions