Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UnsatisfiedRequirementsError: Node on app engine flex environment

I am trying to deploy app engine node service on the flex environment. Below is my configuration in app.yaml

runtime: nodejs8
env: flex

#to name a service use below syntax
service: exampleNodeApp

env_variables:
  NODE_ENV: "dev"
  PORT: 3000

skip_files: 
  .env

manual_scaling:
  instances: 1
resources:
  cpu: 1
  memory_gb: 0.5
  disk_size_gb: 10

The config is going to use the node8 image. My package.json is as below

{
  "name": "expressapp",
  "version": "1.0.0",
  "private": true,
  "main": "./bin/www",
  "scripts": {
     "start": "node ./bin/www",
   },
  "dependencies": {
      "express": "~4.16.3",
   }
}

I have tried specifying the engine also like

{
   "node": "~8.*"
}

And to see the debug logs i used

gcloud app deploy --version default1 --verbosity=debug

the error which i get is as below. Not able to resolve even after trying everything. My app runs fine on the local. Please help!

--update-- the error log

UnsatisfiedRequirementsError: Your application does not satisfy all of  the requirements for a runtime of type [nodejs8].  Please correct the errors and try again.
ERROR: (gcloud.app.deploy) Your application does not satisfy all of the requirements for a runtime of type [nodejs8].  Please correct the errors and try again.
like image 492
Somangshu Goswami Avatar asked Nov 10 '18 17:11

Somangshu Goswami


People also ask

What is Google App Engine flexible environment?

App Engine allows developers to focus on what they do best: writing code. Based on Compute Engine, the App Engine flexible environment automatically scales your app up and down while also balancing the load.

Which option is correct for the flexible environment of App Engine is ---?

"That's correct! App Engine offers NoSQL databases, in-memory caching, load balancing, health checks, logging, and user authentication to applications running in it." 1. Which of these criteria would make you choose App Engine Flexible Environment, rather than Standard Environment, for your application?

What is a runtime environment node?

The Node. js runtime is the software stack responsible for installing your web service's code and its dependencies and running your service.

What is an App Engine flexible environment instance?

Customizable infrastructure - App Engine flexible environment instances are Compute Engine virtual machines, which means that you can take advantage of custom libraries, use SSH for debugging, and deploy your own Docker containers. Performance options - Take advantage of a wide array of CPU and memory configurations.

What happens if I deploy with--no-promote in the App Engine?

If you deploy with --no-promote but allocate any amount of traffic to the new version before the 15 minute window after the deployment completes, this metric may be impacted. It is not possible in the App Engine flexible environment to configure app.yaml so that your app automatically redirects requests to always use HTTPS.

What features does App Engine support?

Native feature support - Features such as microservices, authorization, SQL and NoSQL databases, traffic splitting, logging, versioning, security scanning, and content delivery networks are natively supported. Managed virtual machines - App Engine manages your virtual machines, ensuring that:


1 Answers

Somewhat wrongly defined (not explicitly) in the google docs.

the runtime: nodejs8 is only available for the standard environment. But for the flex env env: flex only nodejs can be given as the param. The gcloud run-time builder does not have anything like nodejs8.

Still trying to figure out whats the version of node given runtime: nodejs.

will update soon.

For further reference here is how I found the solution https://github.com/GoogleCloudPlatform/nodejs-docs-samples/issues/651

like image 106
Somangshu Goswami Avatar answered Oct 08 '22 12:10

Somangshu Goswami