Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

gcloud deploy says my I'm using an old version of node

I'm attempting to deploy my first Google Cloud application.

It happens to be a Node.js application, and when I run "gcloud app deploy" I get the following error:

 

ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: Error(s) encountered validating runtime. Your runtime version for nodejs22 is past End of Support. Please upgrade to the latest runtime version available..

 

 This is what my app.yaml looks like:

 

runtime: nodejs22
env: flex

 

The problem is nodejs22 is indeed the latest version of Node.js.

2 7 2,357
7 REPLIES 7

Hello @alfa_zulu  ,Welcome on Google Cloud Community.

Did you've maybe updated package.json as well as app.yaml? https://cloud.google.com/appengine/docs/standard/nodejs/runtime#nodejs_version

 

{
  "engines": {
    "node": ">16.0.0"
  }
}



--
cheers,
DamianS
LinkedIn medium.com Cloudskillsboost

I already tried modifying package.json and unfortunately it didn't work.

I did have success by changing "env" from "flex" to "standard" in "app.yaml" like so...

runtime: nodejs20
env: standard

I'm not at all clear why this fixed the issue.

Maybe standard have runtime version limitation ? Have no idea. But good, that you've solved issue 🙂 

 

I am still not able to deploy my nodejs app using.

I am using :

runtime: nodejs22
env: flex
 
Also tried to use:
runtime: nodejs22
env: standard
 
Keep getting same errors: 
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: Error(s) encountered validating runtime. Your runtime version for nodejs22 is past End of Support. Please upgrade to the latest runtime version available..
Can some help me on this?

 

were you able to solve the problem?

I am facing the same issue

runtime: nodejs20

env: flex

handlers:
- url: /.*
script: auto

resources:
cpu: 2
memory_gb: 4.6
disk_size_gb: 10

network:
name: default

I had the same error during these days and I got it solved with this configuration:

 

runtime: nodejs

env: flex

runtime_config:
  operating_system: "ubuntu22"
  runtime_version: "20"

manual_scaling:
  instances: 1

network:
  session_affinity: true

resources:
  cpu: 4
  memory_gb: 4


includes:
- extra_env_vars.yaml
entrypoint: yarn start:prod

 

The runtimeversion is the version of node

The 'network: session_affinity: true ' is for sockets.

The resources are important too because I tried with 2 and it gave me this error: Timed out waiting for the flex deployment to become network provisioned.


Also I was deploying with github actions and if i'm not wrong I had to add these too:

 

 - name: "Set up Cloud SDK"
        uses: "google-github-actions/setup-gcloud@v2"
        with:
          version: '>= 420.0.0'

 

Here is the documentation where it talks about the version 420.0.0 for Node.js https://cloud.google.com/appengine/docs/flexible/nodejs/runtime?hl=es-419

And finally I added to the GAE service account the roles : 

  • Monitoring editor
  • Logger writter (Escritor de registros in spanish)

Hope it helps