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.
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.
The following are the steps to install Node.js on the D drive:
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.
Double-click the downloaded installation program to start the installation, and the “Welcome to the Node.js Setup Wizard” welcome interface will appear.
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.
Click the “Install” button to start the installation and wait patiently for the installation to complete.
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"
Enter the node -v
command in the command line window. If Node.js is output version information, the installation is successful.
When installing Node.js on the D drive, you need to pay attention to the following points:
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!