Home  >  Article  >  Web Front-end  >  Install nodejs to d drive

Install nodejs to d drive

WBOY
WBOYOriginal
2023-05-16 21:06:081649browse

This article will introduce how to install Node.js on the D drive, and some issues that need to be paid attention to during the installation process.

Why install Node.js on the D drive

I believe that many developers are accustomed to installing some development tools and software on the C drive without considering the utilization of other drive letters. . But with more and more development projects, the remaining space on the C drive is getting less and less, while the D drive or other drive letters are relatively free. At this time, installing Node.js on the D drive can effectively solve the problem of tight space on the C drive, and can also better plan the use of hard disk space.

How to install Node.js on the D drive

The following are the steps to install Node.js on the D drive:

1. Download Node.js

First you need to go to the Node.js official website [https://nodejs.org](https://nodejs.org) to download the corresponding installation package. Choose the stable version or the latest version of the Node.js installation package to download according to your needs.

2. Open the installation program

Double-click the downloaded installation program to start the installation, and the “Welcome to the Node.js Setup Wizard” welcome interface will appear.

3. Select the installation path

By default, the installation path will be set to the Program Files folder of the C drive. But we need to change the path to a folder on the D drive, such as D:Node.

Click the “Browse” button and select a folder on the D drive as the installation path.

4. Installation

Click the “Install” button to start the installation and wait patiently for the installation to complete.

5. Add environment variables

After the installation is completed, Node.js needs to be added to the system's environment variables to facilitate calling from the command line.

Open the control panel, enter the "Advanced System Settings" -> "Environment Variables" interface, find the "Path" variable under "System Variables", click the "Edit" button, and click in the pop-up editing window Click the "New" button and enter D:Node as the new environment variable.

Note: Multiple paths need to be separated by semicolons; For example: "D:Node;D:Python3"

6. Test

Enter the node -v command in the command line window. If Node.js is output version information, the installation is successful.

Notes

When installing Node.js on the D drive, you need to pay attention to the following points:

  • The installation path cannot contain Chinese characters or spaces. Otherwise some strange errors may occur.
  • Make sure the D drive has enough space to store the Node.js installation files and related resource files.
  • If you have installed Node.js before, you need to uninstall it first.
  • If you are installing the Taobao mirror version of Node.js, the default installation path is the C drive.

Summary

Installing Node.js on the D drive is a very good way to solve the problem of tight space on the C drive, and it also helps to better plan the hard drive space. usage of. During the installation process, you need to note that the installation path cannot contain Chinese characters or spaces, and ensure that the D drive has enough space to store the Node.js installation files and related resource files. Finally, add Node.js to the system's environment variables to facilitate calling from the command line.

The above is the detailed content of Install nodejs to d drive. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn