解决hexo g报错

报错内容

WARN  YAMLException: please see https://github.com/hexojs/hexo/issues/4917
FATAL TypeError: Cannot read properties of undefined (reading 'length')
    at composeNode (/home/hexo/blog/node_modules/hexo/node_modules/js-yaml/lib/loader.js:1492:60)
    at readBlockMapping (/home/hexo/blog/node_modules/hexo/node_modules/js-yaml/lib/loader.js:1104:12)
    at composeNode (/home/hexo/blog/node_modules/hexo/node_modules/js-yaml/lib/loader.js:1441:12)
    at readDocument (/home/hexo/blog/node_modules/hexo/node_modules/js-yaml/lib/loader.js:1625:3)
    at loadDocuments (/home/hexo/blog/node_modules/hexo/node_modules/js-yaml/lib/loader.js:1688:5)
    at Object.load (/home/hexo/blog/node_modules/hexo/node_modules/js-yaml/lib/loader.js:1714:19)
    at Hexo.yamlHelper (/home/hexo/blog/node_modules/hexo/lib/plugins/renderer/yaml.js:20:15)
    at Hexo.tryCatcher (/home/hexo/blog/node_modules/bluebird/js/release/util.js:16:23)
    at Hexo.<anonymous> (/home/hexo/blog/node_modules/bluebird/js/release/method.js:15:34)
    at /home/hexo/blog/node_modules/hexo/lib/hexo/render.js:81:22
    at tryCatcher (/home/hexo/blog/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/hexo/blog/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/home/hexo/blog/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/hexo/blog/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/hexo/blog/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/home/hexo/blog/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/home/hexo/blog/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/home/hexo/blog/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/hexo/blog/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (node:internal/timers:466:21)
root@raspberrypi:/home/hexo/blog# npm i hexo@6.0.0

解决办法

npm i hexo@6.0.0

解决问题出处

https://github.com/hexojs/hexo/issues/4917
点赞 0

Saiyintai

软件测试工程师

暂无评论

相关推荐