Chiaoyvan 2021-05-27 00:37 采纳率: 100%
浏览 884
已采纳

hexo g报错,请问怎么处理?

ubuntu@VM-16-13-ubuntu:~/hexoblog$ sudo hexo s
INFO  Validating config
INFO  Start processing
FATAL { err:
   TypeError: line.matchAll is not a function
       at res.value.res.value.split.map.line (/home/ubuntu/hexoblog/node_modules/hexo-util/lib/highlight.js:128:26)
       at Array.map (<anonymous>)
       at closeTags (/home/ubuntu/hexoblog/node_modules/hexo-util/lib/highlight.js:126:37)
       at highlight (/home/ubuntu/hexoblog/node_modules/hexo-util/lib/highlight.js:119:10)
       at highlightUtil (/home/ubuntu/hexoblog/node_modules/hexo-util/lib/highlight.js:23:16)
       at data.content.dataContent.replace (/home/ubuntu/hexoblog/node_modules/hexo/lib/plugins/filter/before_post_render/backtick_code_block.js:92:17)
       at String.replace (<anonymous>)
       at Hexo.backtickCodeBlock (/home/ubuntu/hexoblog/node_modules/hexo/lib/plugins/filter/before_post_render/backtick_code_block.js:19:30)
       at Hexo.tryCatcher (/home/ubuntu/hexoblog/node_modules/bluebird/js/release/util.js:16:23)
       at Hexo.<anonymous> (/home/ubuntu/hexoblog/node_modules/bluebird/js/release/method.js:15:34)
       at Promise.each.filter (/home/ubuntu/hexoblog/node_modules/hexo/lib/extend/filter.js:67:52)
       at tryCatcher (/home/ubuntu/hexoblog/node_modules/bluebird/js/release/util.js:16:23)
       at Object.gotValue (/home/ubuntu/hexoblog/node_modules/bluebird/js/release/reduce.js:166:18)
       at Object.gotAccum (/home/ubuntu/hexoblog/node_modules/bluebird/js/release/reduce.js:155:25)
       at Object.tryCatcher (/home/ubuntu/hexoblog/node_modules/bluebird/js/release/util.js:16:23)
       at Promise._settlePromiseFromHandler (/home/ubuntu/hexoblog/node_modules/bluebird/js/release/promise.js:547:31)
       at Promise._settlePromise (/home/ubuntu/hexoblog/node_modules/bluebird/js/release/promise.js:604:18)
       at Promise._settlePromiseCtx (/home/ubuntu/hexoblog/node_modules/bluebird/js/release/promise.js:641:10)
       at _drainQueueStep (/home/ubuntu/hexoblog/node_modules/bluebird/js/release/async.js:97:12)
       at _drainQueue (/home/ubuntu/hexoblog/node_modules/bluebird/js/release/async.js:86:9)
       at Async._drainQueues (/home/ubuntu/hexoblog/node_modules/bluebird/js/release/async.js:102:5)
       at Immediate.Async.drainQueues [as _onImmediate] (/home/ubuntu/hexoblog/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'

  • 写回答

5条回答 默认 最新

  • Fsan 2021-05-27 11:40
    关注

    版本12.0.0的Node.js中支持String.matchAll()

    两种解决方法

    请将nodejs升级到高于12.0.0的版本。

    或者 config.xml中的 highlight->enable的值从true更改为false,这样可以避免异常。

    答案来自于StackOverflow

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法
  • ¥15 很想要一个很好的答案或提示
  • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
  • ¥15 怀疑手机被监控,请问怎么解决和防止