Node.js Version

Author:Esadax
Updated:Apr 6, 2025

The Node.js Version setting determines which version of Node.js is used during your project's Build Step as well as for running Serverless Functions.


Why Set the Node.js Version?

  • Ensures compatibility with your project’s dependencies and codebase.
  • Helps avoid unexpected runtime errors caused by version mismatches.
  • Controls the environment your build and serverless functions run in.

Changing the Node.js Version

To change the Node.js version, simply select the desired version from the available options. After updating this setting, a new deployment is required for the change to take effect.


Important: Specify Node.js Engine in package.json

To ensure your project consistently uses the correct Node.js version, always specify the Node.js engine version in your package.json file:

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

This helps both Esadax and other environments know which Node.js version your project expects.


Support for Older Node.js Versions

If your project depends on older Node.js versions, Esadax supports them through preset engine versions. You can specify legacy versions in your package.json to maintain compatibility with older codebases or dependencies.


How It Works

  • The build environment uses the selected Node.js version to install dependencies and run build scripts.
  • Serverless Functions run using the same Node.js version to ensure consistency.

Example Use Cases

  • You’re using a modern framework that requires Node.js 18+.
  • Your project relies on legacy packages only compatible with Node.js 12 or 14.