I am trying to deploy a nodejs project to Google Cloud and got the following error in the Google Cloud SDK Shell after entering gcloud app deploy. I have done the following prior to deploying. (I outlined the steps in quotation block because of some weird formatting issue with the code below that, it's not actually quoting from anywhere). Thanks a bunch!
- Created a project in Google Cloud
- Created app.yaml in the same folder as my app.js. I specified runtime:nodejs and env:flex for the app.yaml
- I set the port to 8080 and added "start": "node app.js", to package.json
- I opened Google Cloud SDK Shell then entered: gcloud auth login. Then I entered gcloud config set project and put in my project ID. Then I entered: gcloud app deploy.
WARNING: Automatic app detection is deprecated and will soon be removed.
As an alternative, create an app.yaml file yourself 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.
Deployment to Google App Engine requires an app.yaml file. This
command will run `gcloud beta app gen-config` to generate an app.yaml for you in
the current directory (if the current directory does not contain an App Engine
service, please answer "no").