Windows10 installation node.js

1. Go to the official website to download node.js

1 https://nodejs.org/zh-cn/download/

Share a picture

2. Install, just default, the installation path can also be chosen by yourself

3. Set environment variables

   1. Install the software, if it is -g, it is a global installation, and it will be installed on the c drive, occupying memory.

    a. Create a new node_global folder in the installation path

    b. Create a new node_cache folder in the installation path

     c. Open powerShell under the path and enter

npm config set prefix "D:\Edittools\node_global"

npm config set cache
"D:\Edittools\node_cache"

  2. Open the computer properties, set the environment

     under the system environment New NODE_HOME,

share picture

Under user variables:

share picture  

   3. Install an express module under test, open powerShell, enter

npm install express -g # -g means global installation

   will have this under your node_global Module to prove that the configuration is successful

1 https: //nodejs.org/zh-cn/download/

npm config set prefix "D:\Edittools\node_global"

npm config set cache
"D:\Edittools\node_cache"

npm install express -g # -g means global installation

Leave a Comment

Your email address will not be published.