All Products
Search
Document Center

Alibaba Cloud SDK:Install Node.js on Windows

Last Updated:Jun 21, 2026

This guide provides detailed steps for installing Node.js on Windows.

  1. Go to the official Node.js website and click Download.

    On the download page, select the Pre-built Installer tab. Select version v20.13.1 (LTS), operating system Windows, and architecture x64. Then, click the Download Node.js v20.13.1 button.

  2. The download page offers several installation methods, as described in the table below.

    Note

    We recommend selecting an LTS (Long-Term Support) version. LTS versions are more stable because they receive extended maintenance.

    Installation method

    Description

    package manager

    Uses the operating system's package manager (such as apt, yum, or brew) to install Node.js.

    Pre-built Installer

    A pre-built installer for a specific operating system, such as a .msi file for Windows or a .pkg file for macOS. These installers include the Node.js runtime, npm, and necessary dependencies.

    Pre-built Binaries

    Pre-built Node.js executable files for various platforms. This method does not include a wizard; you must manually extract the files and configure environment variables.

    Source Code

    This method installs Node.js from its source code. You must extract, configure, and compile the source code using specific commands or scripts to complete the installation.

  3. Double-click the downloaded installer and follow the wizard to complete the installation.

  4. Press Win+R to open the Run dialog, type cmd, and then click OK to open Command Prompt.

  5. Enter node -v and npm -v. If the output is similar to the following, the installation was successful.

    C:\Users\xxx>node -v
    v20.13.1
    C:\Users\xxx>npm -v
    10.5.2
  6. (Optional) Change the npm global module path and cache path.

    After installing Node.js, you can use the npm package manager to install modules and libraries (collectively known as packages). By default, the global installation and cache paths are on the C: drive. Follow these steps to change these locations.

    1. In your Node.js installation directory, create two new folders: node_global and node_cache.

    2. Grant Write and Modify permissions for both folders. Right-click each folder and select Properties > Security. Select your user or group, click Edit, check the Allow boxes for Modify and Write, and then click OK.

    3. In Command Prompt, run the following commands.

      npm config set prefix "D:\ide\nodejs\node_global"
      npm config set cache "D:\ide\nodejs\node_cache"
                
      Important

      Replace D:\ide\nodejs with your actual Node.js installation directory.

    4. Update the environment variable.

      Right-click This PC > Properties > Advanced system settings. In the System Properties window, click Environment Variables. In the Environment Variables window, find the Path variable, select it, and click Edit. In the list of paths, find and change the entry from C:\Users\<YourUsername>\AppData\Roaming\npm to D:\ide\nodejs\node_global.

    5. Verify the change.

      Run npm install jquery -g in Command Prompt. If a jquery folder appears in the D:\ide\nodejs\node_global\node_modules directory, the global module path has been changed successfully.