n8n icon indicating copy to clipboard operation
n8n copied to clipboard

Specify a compatible Node engine version in package.json

Open VxJasonxV opened this issue 4 months ago • 3 comments

Bug Description

The Node version in engines {} specifies any version greater than or equal to Node 20.15: https://github.com/n8n-io/n8n/blob/321d6deef18806d88d97afef2f2c6f29e739ccb4/package.json#L6

When n8n is deployed on a system where the version of Node used is dynamic (e.g. virtually every PaaS, managed app host, etc.), it always picks the latest stable release of Node, which as of this writing is Node 23.0.0. Later in n8n's own code, execution aborts because n8n doesn't support Node 23: https://github.com/n8n-io/n8n/blob/321d6deef18806d88d97afef2f2c6f29e739ccb4/packages/cli/bin/n8n#L27-L32

Please update the Node engine specification to match your in-application version logic's needs.

To Reproduce

  1. Deploy n8n onto your favorite application host.
  2. Assuming a successful build, run the application, observe the output:
==> Requesting Node.js version >=20.15
==> Using Node.js version 23.0.0 via package.json
==> Running 'pnpm run start'

> [email protected] start:default
> cd packages/cli/bin && ./n8n


	Your Node.js version 23.0.0 is currently not supported by n8n.
	Please use Node.js v18.17.0 (recommended), v20, or v22 instead!

 ELIFECYCLE  Command failed with exit code 1.

Expected behavior

A successfully running deployment of n8n, using an appropriate version of Node, in environments where Node is dynamically installed based off package.json definition.

Operating System

Debian Bookworm 12

n8n Version

1.64.0

Node.js Version

23.0.0

Database

SQLite (default)

Execution mode

main (default)

VxJasonxV avatar Oct 18 '24 19:10 VxJasonxV