个人博客搭建之九:hexo_6.3及next_8.13.0版本更新
涉及到本博客所用以下工具,更新到最新版本:
- git: 2.37.3
- node.js: 16.17.1
- hexo: 6.3.0
- webpack: 5.74.0
- next: 8.13.0
- npm: 5.74.0
hexo安转的前提条件:已安装Node.js和Git,而且对Node.js的版本有要求。
更新 git 和 node.js
Git 版本更新:2.36.1 --> 2.37.3
https://git-scm.com/download/win 下载Git-2.37.3-64-bit.exe,全部默认更新安装
Node.js 版本(LTS)更新:16.15.1 --> 16.17.1
下载,全部默认更新安装;勾选:“自动安装必要工具”。
npm的版本未随Node.js更新:8.11.0
1 | git version |
更新 HEXO
版本检查
1 | ======================================== |
Hexo-cli is a cli (command-line-interface) service for create a project. When project was created, all the things doing with hexo module.
hexo-cli 最新版 4.3.0,无需更新。 https://github.com/hexojs/hexo-cli/releases
hexo 最新版 6.3.0,需更新。 https://github.com/hexojs/hexo/releases
更新操作
进入 Hexo (blog) 的目录,
npm outdated
检查一下有哪些 Package 已经过期了:1
2
3
4npm outdated
Package Current Wanted Latest Location Depended by
hexo 6.2.0 6.3.0 6.3.0 node_modules/hexo Blog
hexo-theme-next 8.12.1 8.13.0 8.13.0 node_modules/hexo-theme-next Blog主题现在是以nodejs包的形式存在,所以可通过npm管理之。
npm update
更新之:1
2
3
4
5
6
7
8
9
10
11
12
13
14npm update
added 7 packages, removed 5 packages, changed 21 packages, and audited 191 packages in 16s
3 moderate severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
npm notice
npm notice New minor version of npm available! 8.11.0 -> 8.19.2
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.19.2>
npm notice Run `npm install -g npm@8.19.2` to update!
npm notice似乎不仅仅更新了
hexo
和hexo-renderer-stylus
;警告信息暂忽略。提示npm版本小号更新。
npm 版本更新
1
2
3
4
5npm install -g npm@8.19.2
added 1 package, and audited 212 packages in 8s
found 0 vulnerabilities检查,hexo
1
2
3
4
5
6
7
8
9hexo version
========================================
NexT version 8.13.0
========================================
hexo: 6.3.0
...
npm -v
8.19.2
其它(全局) NodeJS 包版本检查
npm outdated -g
检查其它 Package 是否过期,更新1
2
3
4
5
6npm outdated -g
Package Current Wanted Latest Location Depended by
webpack 5.73.0 5.74.0 5.74.0 node_modules/webpack global
npm install webpack -g
added 1 package, changed 76 packages, and audited 78 packages in 10snpm view webpack version
检查,webpack 版本已更新:5.72.0 --> 5.73.01
2npm view webpack version
5.74.0注:webpack 是一个现代 JavaScript 应用程序的静态模块打包器(module bundler).