PS D:\HEXO\yourblog> hexo -v INFO Validating config hexo: 7.3.0
全局升级hexo-cli,运行npm i hexo-cli -g
PS D:\HEXO\yourblog> npm i hexo-cli -g npm error code EPERM npm error syscall unlink npm error path D:\nodejs\node_modules\hexo-cli\LICENSE npm error errno -4048 npm error [Error: EPERM: operation not permitted, unlink 'D:\nodejs\node_modules\hexo-cli\LICENSE'] { npm error errno: -4048, npm error code: 'EPERM', npm error syscall: 'unlink', npm error path: 'D:\\nodejs\\node_modules\\hexo-cli\\LICENSE' npm error } npm error npm error The operation was rejected by your operating system. npm error It's possible that the file was already in use (by a text editor or antivirus), npm error or that you lack permissions to access it. npm error npm error If you believe this might be a permissions issue, please double-check the npm error permissions of the file and its containing directories, or try running npm error the command again as root/Administrator. npm error A complete log of this run can be found in: C:\Users\1\AppData\Local\npm-cache\_logs\2026-10-23T03_36_48_072Z-debug-0.log
59 packages are looking for funding run `npm fund` for details
检查系统插件是否需要升级,运行npm-check
PS D:\HEXO\yourblog> npm-check
@renbaoshuo/markdown-it-katex 😕 NOTUSED? Still using @renbaoshuo/markdown-it-katex? Depcheck did not find code similar to require('@renbaoshuo/markdown-it-katex') or import from '@renbaoshuo/markdown-it-katex'. Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used. Use rc file options to remove unused check, but still monitor for outdated version: .npmcheckrc {"depcheck": {"ignoreMatches": ["@renbaoshuo/markdown-it-katex"]}} Use --skip-unused to skip this check. To remove this package: npm uninstall @renbaoshuo/markdown-it-katex --save
hexo 😎 MAJOR UP Major update available. https://hexo.io/ npm install hexo@8.1.2 --save to go from 7.3.0 to 8.1.2
hexo-algolia 😕 NOTUSED? Still using hexo-algolia? Depcheck did not find code similar to require('hexo-algolia') or import from 'hexo-algolia'. Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used. Use rc file options to remove unused check, but still monitor for outdated version: .npmcheckrc {"depcheck": {"ignoreMatches": ["hexo-algolia"]}} Use --skip-unused to skip this check. To remove this package: npm uninstall hexo-algolia --save ......
这里可以看到所有可升级依赖项都已经列出
安装npm-upgrade,运行npm install -g npm-upgrade
PS D:\HEXO\yourblog> npm install -g npm-upgrade npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated har-validator@5.1.5: this library is no longer supported npm warn deprecated @npmcli/ci-detect@1.4.0: this package has been deprecated, use `ci-info` instead npm warn deprecated npmlog@4.1.2: This package is no longer supported. npm warn deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported. npm warn deprecated figgy-pudding@3.5.2: This module is no longer supported. npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm warn deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm warn deprecated libnpmconfig@1.2.1: This module is not used anymore. npm config is parsed by npm itself and by @npmcli/config npm warn deprecated gauge@2.7.4: This package is no longer supported. npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
added 375 packages in 12s
52 packages are looking for funding run `npm fund` for details
更新 package.json,运行npm-upgrade
PS D:\HEXO\yourblog> npm-upgrade Checking for outdated production, optional, development, peer and bundled dependencies for "D:\HEXO\winelife\package.json"... [====================] 24/24 100%
PS D:\HEXO\yourblog> npm update -g npm warn deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs npm warn deprecated @npmcli/ci-detect@1.4.0: this package has been deprecated, use `ci-info` instead npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated npmlog@4.1.2: This package is no longer supported. npm warn deprecated figgy-pudding@3.5.2: This module is no longer supported. npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm warn deprecated har-validator@5.1.5: this library is no longer supported npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated libnpmconfig@1.2.1: This module is not used anymore. npm config is parsed by npm itself and by @npmcli/config npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported. npm warn deprecated gauge@2.7.4: This package is no longer supported. npm warn deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
removed 84 packages, and changed 878 packages in 24s
101 packages are looking for funding run `npm fund` for details
更新系统插件,运行npm update --save
PS D:\HEXO\yourblog> npm update --save npm warn deprecated moize@6.1.7: This library has been deprecated in favor of micro-memoize, which as-of version 5 incorporates most of the functionality that this library offers at nearly half the size and better speed.
added 40 packages, removed 18 packages, and changed 62 packages in 12s
61 packages are looking for funding run `npm fund` for details
再次查看版本,确认是否升级成功
PS D:\HEXO\winelife> hexo -v INFO Validating config hexo: 8.1.2