Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 756
Amit Shakya Avatar asked Sep 04 '25 16:09

Amit Shakya


1 Answers

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

like image 98
Victor M Herasme Perez Avatar answered Sep 07 '25 17:09

Victor M Herasme Perez