简介

​ 本地Nodejs 安装版本为 v12.18.3 ,版本过低,需要升级。

升级前版本记录

版本记录

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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# node 版本
D:\Mac\FrontEnd\Nodejs>node -v
v12.18.3
# npm 版本
D:\Mac\FrontEnd\Nodejs>npm -v
6.14.6
#npm 配置
D:\Mac\FrontEnd\Nodejs>npm config get
; cli configs
metrics-registry = "https://registry.npm.taobao.org/"
scope = ""
user-agent = "npm/6.14.6 node/v12.18.3 win32 x64"

; userconfig C:\Users\Iduohua\.npmrc
cache = "D:\\Mac\\FrontEnd\\Nodejs\\node_cache"
prefix = "D:\\Mac\\FrontEnd\\Nodejs\\node_global"
registry = "https://registry.npm.taobao.org/"

; builtin config undefined

; node bin location = D:\Mac\FrontEnd\Nodejs\node.exe
; cwd = D:\Mac\FrontEnd\Nodejs
; HOME = C:\Users\Iduohua
; "npm config ls -l" to show all defaults.

# yarn 版本
D:\Mac\FrontEnd\Nodejs>yarn -v
1.22.10

# hexo 版本
D:\Mac\FrontEnd\Nodejs>hexo -v
hexo-cli: 4.2.0
os: Windows_NT 10.0.22621 win32 x64
node: 12.18.3
v8: 7.8.279.23-node.39
uv: 1.38.0
zlib: 1.2.11
brotli: 1.0.7
ares: 1.16.0
modules: 72
nghttp2: 1.41.0
napi: 6
llhttp: 2.0.4
http_parser: 2.9.3
openssl: 1.1.1g
cldr: 37.0
icu: 67.1
tz: 2019c
unicode: 13.0

环境变量配置

image-20230905155905371

升级

V21.0.0下载

V21.0.0官方下载地址

卸载现有Node.js

image-20231018112122632

卸载后问价夹

image-20231018112228234

安装V21.0.0

双击node-v21.0.0-x64.msi

无脑下一步,注意安装位置改变下。

image-20231018112432559

升级yarn

1
2
3
4
D:\Mac\FrontEnd\Nodejs>npm install yarn -g
changed 1 package in 3s
D:\Mac\FrontEnd\Nodejs>yarn -v
1.22.19