$ npx update npx: installed 657 in 41.672s [09:35:05] using file ~/Users/xxx/.npm/_npx/56179/lib/node_modules/update/lib/updatefile.js [09:35:05] starting update.default [09:35:05] ✔ running: init
Current updaters: init
no updaters were saved. [09:35:06] finished update.default ✔ 221ms internal/modules/cjs/loader.js:968 throw err; ^
Error: Cannot find module 'set-blocking' Require stack: - /Users/xxx/.npm/_npx/56179/lib/node_modules/update/bin/update.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15) at Function.Module._load (internal/modules/cjs/loader.js:841:27) at Module.require (internal/modules/cjs/loader.js:1025:19) at require (internal/modules/cjs/helpers.js:72:18) at process.<anonymous> (/Users/xxx/.npm/_npx/56179/lib/node_modules/update/bin/update.js:4:3) at process.emit (events.js:327:22) at process.exit (internal/process/per_thread.js:167:15) at /Users/xxx/.npm/_npx/56179/lib/node_modules/update/bin/update.js:55:15 at /Users/xxx/.npm/_npx/56179/lib/node_modules/update/node_modules/base-generators/index.js:482:13 at /Users/xxx/.npm/_npx/56179/lib/node_modules/update/node_modules/async-each-series/index.js:15:40 { code: 'MODULE_NOT_FOUND', requireStack: [ '/Users/xxx/.npm/_npx/56179/lib/node_modules/update/bin/update.js' ] }
3 packages are looking for funding run `npm fund` for details
found 52 vulnerabilities (22 low, 12 moderate, 18 high) run `npm audit fix` to fix them, or `npm audit` for details ➜ npm audit fix added 16 packages from 53 contributors, removed 3 packages and updated 13 packages in 8.957s
4 packages are looking for funding run `npm fund` for details
fixed 18 of 52 vulnerabilities in 561 scanned packages 11 vulnerabilities required manual review and could not be updated 3 package updates for 23 vulnerabilities involved breaking changes (use `npm audit fix --force` to install breaking changes; or refer to `npm audit` for steps to fix these manually) ➜ npm audit fix --force npm WARN using --force I sure hope you know what you are doing. + hexo-deployer-git@2.1.0 + hexo-renderer-marked@3.2.0 + hexo@5.2.0 added 22 packages from 286 contributors, removed 370 packages, updated 55 packages and moved 1 package in 17.734s
6 packages are looking for funding run `npm fund` for details
fixed 23 of 34 vulnerabilities in 574 scanned packages 11 vulnerabilities required manual review and could not be updated 3 package updates for 23 vulnerabilities involved breaking changes (installed due to `--force` option) ➜ npm audit
=== npm audit security report ===
┌──────────────────────────────────────────────────────────────────────────────┐ │ Manual Review │ │ Some vulnerabilities require your attention to resolve │ │ │ │ Visit https://go.npm.me/audit-guide for additional guidance │ └──────────────────────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ Low │ Prototype Pollution │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ minimist │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Patched in │ >=0.2.1 <1.0.0 || >=1.2.3 │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ hexo-deployer-git │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ hexo-deployer-git > swig-templates > optimist > minimist │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/1179 │ └───────────────┴──────────────────────────────────────────────────────────────┘ found 1 low severity vulnerability in 226 scanned packages 1 vulnerability requires manual review. See the full report for details. ➜ npx hexo -v INFO Validating config WARN Deprecated config detected: "external_link" with a Boolean value is deprecated. See https://hexo.io/docs/configuration for more details. hexo: 5.2.0 hexo-cli: 4.2.0 os: Darwin 17.7.0 darwin x64 node: 12.18.4 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.1.2 http_parser: 2.9.3 openssl: 1.1.1g cldr: 37.0 icu: 67.1 tz: 2019c unicode: 13.0
可以看到hexo已经升级,hexo-deployer-git存在一个low的安全问题。验证hexo版本的时候存在一个warning, WARN Deprecated config detected: "external_link" with a Boolean value is deprecated. See https://hexo.io/docs/configuration for more details.看了下文档,更改下_config.yml的external_link部分。从
1
external_link: true # Open external links in new tab
修改为
1 2 3 4
external_link: enable: true # Open external links in new tab field: site exclude: ''