Amit Shakya
Amit Shakya

Reputation: 994

GAE app deployment fails with 'crash' error

Hi I have made very basic hello world nodejs app, I have cloned my app on google cloud and able to run app locally on GCP on port 8080, but when I run gcloud app deploy it crashed, I have crosscheck the configuration, I have app.yaml with configration

app.yaml
runtime:nodejs8
vm:true
env:flex 

Gcloud console shell error preview

Upvotes: 4

Views: 4148

Answers (2)

asim
asim

Reputation: 29

Just add 1 space in between keys and values in your App.yaml file

runtime: nodejs8
vm: true
env: flex

It will work :)

Upvotes: 0

Manuel Perez Heredia
Manuel Perez Heredia

Reputation: 2357

One issue is the you need spaces in the app.yaml file, this is what causes the error:

ERROR: gcloud crashed (TypeError): expected string or buffer...

First add the spaces:

runtime: nodejs8
vm: true
env: flex

Also you're including deprecated characteristics in the app.yaml. The vm: true should be deleted and only use env: flex.

So the final version of the app.yaml should be:

runtime: nodejs
env: flex

#plus other config options

If you want to specify the nodejs version, add this to the package.json:

{
  "engines": {
    "node": "9.x"
  }
}

Please see the details here

Upvotes: 7

Related Questions