Installation and configuration tutorial of node.js in Win10 environment (super detailed)

content

1. Download node.js 16.14.2 LTS

2. Installation process

3. Check the installation information

4. Change the installation information (optional, but it is recommended to modify)

5. Change the mirror source

6. Install the global vue-cli scaffolding

1. Download node.js 16.14.2 LTS

Official website: Node.js

If you want to install other versions as well:

2. Installation process

All the way to Next can be, here are only two pictures that need to be changed:

3. Check the installation information

        After the installation is complete, open cmd and enter the npm -v and node -v commands in turn. The version information appears as shown in the figure below, indicating that the installation is successful.

4. Change the installation information (optional, but it is recommended to modify)

1> Create two new folders to be configured in the installation path as shown in the figure, named: node_cache node_global

2> Execute the following command in cmd (change the path to the path of your newly created folder)

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

3> Add environment variables (as shown in the figure, it is very simple and will not be expanded in detail)

5. Change the mirror source

Run cmd as administrator and execute the following commands:

npm  install  -g  cnpm  --registry=https://registry.npm.taobao.org

6. Install the global vue-cli scaffolding

Execute the command in cmd:

cnpm install --global vue-cli

If an error is reported:

Error: EPERM: operation not permitted, mkdir '...'

solution:

Enter the installation path of cnpm and execute cnpm -v to check whether the installation is successful. If successful, the version information will be returned.

        Under the premise of ensuring the installation is successful, modify the permissions (radical method, of course, you can run cmd as an administrator every time, I think it is troublesome, so just change the permissions directly),

Right click on the nodejs installation folder and select Properties---->Security

 Edit permissions, check Full Control

Changing :

Changed

 

In this way, we can directly execute cnpm related commands in cmd:

In this way, we can execute the previous command to install the global vue-cli scaffolding:

After the installation is successful, execute the command vue -V to return the version information:

Guess you like

Origin blog.csdn.net/qq_43554335/article/details/123723237