I am trying to deploy a node.js app to appEngine but he doesn't seem to like my app.yaml.
D:\projects\Personal\Project>gcloud app deploy
ERROR: (gcloud.app.deploy) An error occurred while parsing file: [D:\projects\Personal\Project\app.yaml]
No URLMap entries found in application configuration
in "D:\projects\Personal\Project\app.yaml", line 10, column 12
Here's the app.yaml:
runtime: nodejs
env: standard
skip_files:
- ^node_modules$
env_variables:
USER: 'dbUser'
PASSWORD: 'DBPass'
DB: 'URI to DB'
Am I missing something here? Could it be that it's because of my folder structure?
I have following structure: - client - server ---- server.js - app.yaml
So the app.yaml is not in the server folder as otherwise it doesn't include the client folder...
Now that nodejs8 is supported in the standard environment (still in beta at this time), you must update your local gcloud environment to be able to deploy. Updating your gcloud components will make this warning go away.
Run
gcloud components update
Update your app.yaml file
See Google's github for the most basic example required: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/building-an-app/build/app.yaml
Update your package.json
Specify the appropriate compatible node version, example:
"engines": {
"node": ">=8.0.0"
},
Full Tutorial On building a nodejs8 app in the App Engine standard environment: https://cloud.google.com/appengine/docs/standard/nodejs/building-app/
The standard environment deploys significantly faster than the flex environment.
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