Changing the Node.js version of Drupal applications¶
Code Studio supports the following Node.js versions to build Drupal applications:
The default version is 18.20.3.
To view or change your Node.js version, you must add or update the before_script section in your custom .gitlab-ci.yml
file:
To view the available versions, add:
To switch to a different Node.js version, add:
Replace <version_number>
with the required version.
To view the current Node.js version, add:
For example:
include:
- project: 'acquia/standard-template'
file:
- '/gitlab-ci/Auto-DevOps.acquia.gitlab-ci.yml'
"Build Code":
before_script:
- nvm ls
- nvm use 20.14.0
- node -v
Changing the Node.js version of Node.js applications¶
To change the Node.js version, use the NODE_VERSION
environment variable. For more information, see Other environment variables.