尼采般地抒情

公告栏

此网站主题为本人手写主题,主题还在开发中……


作者:尼采般地抒情

站点信息

文章数目:259
已运行时间:
目录
  1. 报错信息
  2. 问题分析与解决
  3. 小记

尼采般地抒情

尼采般地抒情

公告栏

此网站主题为本人手写主题,主题还在开发中……


作者:尼采般地抒情

站点信息

文章数目:259
已运行时间:

报错信息

GitHub Actions 流程中 hexo g 出现错误,具体错误在“Vue 笔记”中那篇文章中,有个地方用到了大括号嵌套的情况。

    =====             Context Dump Ends            =====
    at formatNunjucksError (/home/runner/work/website/website/node_modules/hexo/lib/extend/tag.js:102:13)
    at Promise.fromCallback.catch.err (/home/runner/work/website/website/node_modules/hexo/lib/extend/tag.js:124:34)
    at tryCatcher (/home/runner/work/website/website/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/runner/work/website/website/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/home/runner/work/website/website/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/runner/work/website/website/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/runner/work/website/website/node_modules/bluebird/js/release/promise.js:725:18)
    at _drainQueueStep (/home/runner/work/website/website/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/home/runner/work/website/website/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/home/runner/work/website/website/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/runner/work/website/website/node_modules/bluebird/js/release/async.js:15:14)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
Error: Process completed with exit code 2.

问题分析与解决

上述代码中第二行其实已经说的很明确 at formatNunjucksError
但是 hexo 中,渲染过程中用到的是 Nunjucks,在 Nunjucks 中双大括号被视为语法,所以报错。

小记

https://www.wztlink1013.com/blog/pxpix4/

其实之前遇到过类似的问题……写的博客还是要经常回顾……

评论区

Beaudar Twikoo

最新评论

Loading...