---
title: "Changing the Node.js version"
date: "2024-12-30T11:58:15+00:00"
summary: "Learn how to change Node.js versions for Drupal and Node.js applications in Code Studio with step-by-step instructions."
image:
type: "page"
url: "/acquia-cloud-platform/add-ons/code-studio/changing-nodejs-version"
id: "e459b4aa-27d5-4428-86f1-de082a5de633"
---

Changing the Node.js version of Drupal applications
---------------------------------------------------

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

*   20.14.0 (default)
*   22.13.0

To view or change your Node.js version, you must add or update the [before\_script](/acquia-cloud-platform/add-ons/code-studio/adding-custom-scripts-code-studio-jobs "Adding custom scripts to Code Studio jobs") 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 22.13.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](/acquia-cloud-platform/add-ons/code-studio/customizing-code-studio/default-code-studio-pipeline/environment-variables#section-using-environment-variables-to-enable-or-disable-a-cicd-job).