博客搭建

1,安装nvm工具

nvm命令使用,为了确保命令能正确执行
<font color='Red'>请所有命令在管理员权限下执行</font>

  1. nvm list可以缩写为 nvm ls
    列出当前 nvm工具管理的,·node版本以及在当前使用版本前给出 *标记
1
2
3
PS C:\Users\admin> nvm ls
16.16.0
* 14.15.4 (Currently using 64-bit executable)
  1. nvm list available 其中 list可以缩写成 ls
    列出node.js的安装。在结尾处输入 “available “以查看可以安装的内容。别名为ls。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
PS C:\Users\admin> nvm ls available
| CURRENT | LTS | OLD STABLE | OLD UNSTABLE |
|--------------|--------------|--------------|--------------|
| 19.2.0 | 18.12.1 | 0.12.18 | 0.11.16 |
| 19.1.0 | 18.12.0 | 0.12.17 | 0.11.15 |
| 19.0.1 | 16.18.1 | 0.12.16 | 0.11.14 |
| 19.0.0 | 16.18.0 | 0.12.15 | 0.11.13 |
| 18.11.0 | 16.17.1 | 0.12.14 | 0.11.12 |
| 18.10.0 | 16.17.0 | 0.12.13 | 0.11.11 |
| 18.9.1 | 16.16.0 | 0.12.12 | 0.11.10 |
| 18.9.0 | 16.15.1 | 0.12.11 | 0.11.9 |
| 18.8.0 | 16.15.0 | 0.12.10 | 0.11.8 |
| 18.7.0 | 16.14.2 | 0.12.9 | 0.11.7 |
| 18.6.0 | 16.14.1 | 0.12.8 | 0.11.6 |
| 18.5.0 | 16.14.0 | 0.12.7 | 0.11.5 |
| 18.4.0 | 16.13.2 | 0.12.6 | 0.11.4 |
| 18.3.0 | 16.13.1 | 0.12.5 | 0.11.3 |
| 18.2.0 | 16.13.0 | 0.12.4 | 0.11.2 |
| 18.1.0 | 14.21.1 | 0.12.3 | 0.11.1 |
| 18.0.0 | 14.21.0 | 0.12.2 | 0.11.0 |
| 17.9.1 | 14.20.1 | 0.12.1 | 0.9.12 |
| 17.9.0 | 14.20.0 | 0.12.0 | 0.9.11 |
| 17.8.0 | 14.19.3 | 0.10.48 | 0.9.10 |

This is a partial list. For a complete list, visit https://nodejs.org/en/download/releases
  1. nvm node_mirror [url] 设置node节点镜像。默认为https://nodejs.org/dist/。将[url]留空,以使用默认url。
    设置淘宝镜像 node_mirror:https://npm.taobao.org/mirrors/node
  2. nvm nmp_mirror [url] 设置npm的镜像。默认为https://github.com/npm/cli/archive/。将[url]留空为默认url
    设置淘宝镜像:npm_mirror: https://npm.taobao.org/mirrors/npm/
    理论上设置完以上两步,安装速度会快上很多,即使你没有给你的网络‘施展魔法’
  3. nvm install <version> [arch]
    版本可以是一个特定的版本,”latest “表示最新的当前版本,”lts “表示最新的LTS版本。最新的LTS版本。可选择指定是安装32位还是64位版本(默认为 默认为 system arch)。将[arch]设置为 “all”,以安装32和64位版本。在该命令的末尾添加 --insecure,以绕过远程下载服务器的SSL验证。

2,使用nvm工具,安装node环境