[root@localhost blog]# hexo g
(node:1484) ExperimentalWarning: The fs.promises API is experimental
INFO Validating config
INFO Start processing
FATAL { err:
TypeError: line.matchAll is not a function
at res.value.res.value.split.map.line (/opt/blog/node_modules/hexo-util/lib/highlight.js:128:26)
at Array.map (<anonymous>)
at closeTags (/opt/blog/node_modules/hexo-util/lib/highlight.js:126:37)
at highlight (/opt/blog/node_modules/hexo-util/lib/highlight.js:119:10)
at highlightUtil (/opt/blog/node_modules/hexo-util/lib/highlight.js:23:16)
at data.content.dataContent.replace (/opt/blog/node_modules/hexo/lib/plugins/filter/before_post_render/backtick_code_block.js:92:17)
at String.replace (<anonymous>)
at Hexo.backtickCodeBlock (/opt/blog/node_modules/hexo/lib/plugins/filter/before_post_render/backtick_code_block.js:19:30)
at Hexo.tryCatcher (/opt/blog/node_modules/bluebird/js/release/util.js:16:23)
at Hexo.<anonymous> (/opt/blog/node_modules/bluebird/js/release/method.js:15:34)
at Promise.each.filter (/opt/blog/node_modules/hexo/lib/extend/filter.js:67:52)
at tryCatcher (/opt/blog/node_modules/bluebird/js/release/util.js:16:23)
at Object.gotValue (/opt/blog/node_modules/bluebird/js/release/reduce.js:166:18)
at Object.gotAccum (/opt/blog/node_modules/bluebird/js/release/reduce.js:155:25)
at Object.tryCatcher (/opt/blog/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/opt/blog/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/opt/blog/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromiseCtx (/opt/blog/node_modules/bluebird/js/release/promise.js:641:10)
at _drainQueueStep (/opt/blog/node_modules/bluebird/js/release/async.js:97:12)
at _drainQueue (/opt/blog/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/opt/blog/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/opt/blog/node_modules/bluebird/js/release/async.js:15:14) } 'Something\'s wrong. Maybe you can find the solution here: %s' '\u001b[4mhttps://hexo.io/docs/troubleshooting.html\u001b[24m'
##百度了一下,有两种方案可以解决
1. 更新node 版本到12.0.0
如果更新到v12,需要重新安装
2. 修改配置
vim _config.yml 中修改
highlight:
enable: false ###默认是true 修改成false
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hexo 安装 报错
最新推荐文章于 2024-08-15 14:39:16 发布