Install Node.js in Windows system environment

Step 1: Visit the official website of Node.js

Visit the official website address of Node.js: https://nodejs.org/zh-cn/ , as shown below:

Insert picture description here

Node.js officially provides two versions: one is the long-term support version and the other is the latest version. It is recommended to download the long-term support version, because this version is more stable . As shown below:

Insert picture description here

Select the long-term support version (click the button above) and download the installation file for the Windows system. As shown below:

Insert picture description here

Step 2: Install Node.js environment

1. Double-click the installation file of Node.js to enter the installation interface of Node.js. As shown below:

Insert picture description here

2. Click the [Next] button in the lower right corner to continue to install the Node.js environment. As shown below:

Insert picture description here

As shown in the figure above, it shows the official "Software License Agreement" of Node.js.

3. Check the option "I accept the terms in the License Agreement" to indicate that you agree to the content of the Node.js software license agreement. As shown below:

Insert picture description here

4. Click the [Next] button to continue to install the Node.js environment. As shown below:

Insert picture description here

As shown in the figure above, it is generally recommended to use the default path for customizing the installation path of the Node.js environment.

If you customize the installation path, please note that the path cannot contain Chinese or spaces, which may cause garbled characters.

5. Click the [Next] button to continue to install the Node.js environment. As shown below:

Insert picture description here

As shown in the figure above, custom install the components of the Node.js environment. It is generally recommended to install all components, which is installed by default.

6. Click the [Next] button to continue to install the Node.js environment. As shown below:

Insert picture description here

As shown in the figure above, ask whether to confirm the installation of Node.js environment. (This step is mainly to confirm the previous settings)

7. Click the [Install] button to automatically install the Node.js environment. As shown below:

Insert picture description here

8. Wait for the Node.js environment to be automatically installed, as shown below:

Insert picture description here

As shown in the figure above, click the [Finish] button to end the installation process of the Node.js environment.

Step 3: Verify whether Node.js is installed successfully

1. Run the "command line" program under Windows system, as shown below:

Insert picture description here

2. Enter the following command in the "Command Line" program to verify whether the Node.js environment is installed successfully.

node -v

If the prompt content as shown in the figure below appears in the "Command Line" program, it means that the Node.js environment is successfully installed. As shown below:

Insert picture description here

It should be noted that the node -v command means to view the version of the current Node.js environment.

Step 4: Verify that the npm package manager is available

1. Run the "command line" program under Windows system, as shown below:

Insert picture description here

2. Enter the following command in the "command line" program to verify whether the npm package manager is available.

npm -v

If the following prompt appears in the "Command Line" program, it means that the npm package manager is available. As shown below:

Insert picture description here

It should be noted that: the npm -v command means to view the current version of the npm package manager.

Guess you like

Origin blog.csdn.net/u013575441/article/details/108742759