ERROR: (gcloud.app.deploy) could not be identified as a valid source directory or file

Viewed 3680

I get this error every time I run the gcloud app deploy command.

My app.yaml is in the same directory as where manage.py is. I am also not working from Local disk C, am working from Local disk G and using Visual studio code cmd terminal.

ERROR: An app.yaml (or appengine-web.xml) file is required to deploy this directory as an App Engine application. Create an app.yaml file using the directions at https://cloud.google.com/appengine/docs/flexible/python/configuring-your-app-with-app-yaml (App Engine Flexible Environment) or https://cloud.google.com/appengine/docs/standard/python/config/appref (App Engine Standard Environment) under the tab for your language.

ERROR: (gcloud.app.deploy) [G:\] could not be identified as a valid source directory or file.
2 Answers

From what I can understand, you are running the "gcloud app deploy" command from the main folder of your G: local disk.

In order to deploy the app, your path should be the one that the app.yaml file is in or specify the path as a parameter as shown here in the first example when you run the "gcloud app deploy".

  1. You are wrong the directory.

  2. To make sure app.yaml path, you can include it into command line as below:

    gcloud --quiet --project $PROJECT_ID app deploy app.yaml

Related