Loading...

Changing the Node.js version

Changing the Node.js version of Drupal applications

Code Studio supports the following Node.js versions to build Drupal applications:

  • 18.20.3
  • 20.14.0

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:

    nvm ls                       
  • To switch to a different Node.js version, add:

    nvm use <version_number>
    

    Replace <version_number> with the required version.

  • To view the current Node.js version, add:

    node -v
    

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.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation
Back to Site navigation