Setting Your Node.js Version

Node.js version 20.11.1 is the default for Render services created on or after 2024-02-23.

Set a different Node.js version in any of the following ways (in descending order of precedence):

  • Set the NODE_VERSION environment variable for your service in the Render Dashboard:

    Setting the NODE_VERSION environment variable

  • Add a file named .node-version to the root of your repo. This file contains a single line with the version to use:

    18.18.0
  • Add a file named .nvmrc to the root of your repo. This file uses the same format as .node-version.

  • Specify a Node.js version range in your package.json file, under the engines property:

    "engines": {
      "node": ">=18.18.0 <19.0.0"
    }

    If there isn’t a package.json file in your repo’s root directory, Render uses the first package.json file it finds in a subdirectory.

You can specify either a semantic version number (such as 18.18.0) or an alias (such as lts).

Render uses the node-version-alias module to resolve version aliases and semver ranges.

History of default Node.js versions

If you don’t set a Node.js version for your service, Render’s default version depends on when you originally created the service:

Service Creation DateDefault Node.js Version
2024-02-23 and later20.11.1
2023-11-29 - 2024-02-2320.10.0
Before 2023-11-0114.17.0