Node.js version
Last updated
Last updated
We are using Node 20 with NPM 10 as the default Node version. If you need a different Node and NPM version, update your code repository according to this documentation.
Next upgrade to the Node version is planned for October 2024 when Node 22 will become the LTS version.
ReadyMage provides support for running all LTS releases of Node.js starting Node 14: Node 14 with NPM 6, Node 16 with NPM 8, Node 18 with NPM 10, Node 20 with NPM 10 and Node 22 with NPM 10.
Version mapping looks like this:
Node version | NPM version | Yarn version |
---|---|---|
You can select the Node and NPM versions according to your Magento theme installation and build requirements using one of the following methods:
By adjusting package.json file engines.node field you can specify the Node version that is required to be used for your theme dependency installation and command execution.
General documentation for engines field is available here.
We don't recommend using this method of selecting the Node.js version unless you know what you are doing.
The .node-version
file should be located in the same directory as package.json
.
.node-version
file syntax allows you to specify the exact version that you need.
The advantage of this approach is that you can install any version you want. Not just versions from a provided list. Using a non-LTS version is not recommended.
Node version defined in .node-version
has a higher priority than the one defined in package.json
file engines.node
field.
14
6
1
16
8
1
18
10
1
20
10
1
22
10
1