This website uses cookies to ensure you get the best experience. Learn More.
Coming Soon: Node 20
Liferay is busy working on updating the Node version used by the Gradle plugins in the Gradle Workspace from Node 16.13.0 (or 16.15.1 depending upon where you look) to Node 20.12.2.
16.13.0
16.15.1
20.12.2
I'm told that this update is only supposed to apply to new versions of Liferay greater than GA117 and U117 (which means the upcoming 2024.Q2 release and later).
I'm also told that it only affects the build, it has no impact on the runtime, so even if you updated the workspace plugin and somehow started using Node 20, your builds should still be fine and your runtime unaffected.
Fortunately if you do end up using Node 20 because you've updated your workspace plugins or some other oddity occurs, you can force the use of Node 16.
Just edit the build.gradle file in the root of your workspace and assign the node version by adding the following lines:
build.gradle
node { nodeVersion = "16.15.1" }
This example, taken from the Liferay Samples Workspace for CX, is using Node 16.15.1.
When the build occurs, the Liferay gradle plugins will download this version of node to use during the build process. If you don't override the version in build.gradle, then the default version (in the soon to be released plugins) will be used, or 20.12.2.
Anyway, hope this helps!