春草梦,也宜夏 2022-11-23 22:08 采纳率: 100%
浏览 280
已结题

Unhandled rejection TypeError报错,hexo博客搭建,butterfly主题

朋友们!
就是搭建hexo(butterfly主题)个人博客的时候,进行到改**_config.butterfly.yml**文件的时候,改着改着突然停电了,印象里是有保存的,但不确定了,第二天运行时_hexo cl;hexo s_,发现报错了

Unhandled rejection TypeError: D:\bai\node_modules\hexo-theme-butterfly\layout\includes\widget\index.pug:29
    27|       !=partial('includes/widget/card_recent_post', {}, {cache: true})
    28|       !=partial('includes/widget/card_ad', {}, {cache: true})
  > 29|       !=partial('includes/widget/card_newest_comment', {}, {cache: true})
    30|       !=partial('includes/widget/card_categories', {}, {cache: true})
    31|       !=partial('includes/widget/card_tags', {}, {cache: true})
    32|       !=partial('includes/widget/card_archives', {}, {cache: true})

D:\bai\node_modules\hexo-theme-butterfly\layout\includes\widget\card_newest_comment.pug:1
  > 1| if theme.newest_comments.enable && !['Livere','Facebook Comments','Giscus'].includes(theme.comments.use[0])
    2|   .card-widget#card-newest-comments
    3|     .item-headline
    4|       i.fas.fa-comment-dots

Cannot read properties of null (reading '0')
    at eval (eval at wrap (D:\bai\node_modules\pug-runtime\wrap.js:6:10), <anonymous>:8:105)
    at template (eval at wrap (D:\bai\node_modules\pug-runtime\wrap.js:6:10), <anonymous>:26:7)
    at _View._compiledSync (D:\bai\node_modules\hexo\lib\theme\view.js:132:24)
    at _View.renderSync (D:\bai\node_modules\hexo\lib\theme\view.js:59:25)
    at D:\bai\node_modules\hexo\lib\plugins\helper\partial.js:31:52
    at Cache.apply (D:\bai\node_modules\hexo-util\lib\cache.js:27:46)
    at Object.fragmentCache (D:\bai\node_modules\hexo\lib\plugins\helper\fragment_cache.js:11:34)
    at Object.partial (D:\bai\node_modules\hexo\lib\plugins\helper\partial.js:31:17)
    at eval (eval at wrap (D:\bai\node_modules\pug-runtime\wrap.js:6:10), <anonymous>:1878:46)
    at template (eval at wrap (D:\bai\node_modules\pug-runtime\wrap.js:6:10), <anonymous>:5834:7)
    at _View._compiled (D:\bai\node_modules\hexo\lib\theme\view.js:136:50)
    at _View.render (D:\bai\node_modules\hexo\lib\theme\view.js:39:17)
    at D:\bai\node_modules\hexo\lib\hexo\index.js:64:21
    at tryCatcher (D:\bai\node_modules\bluebird\js\release\util.js:16:23)
    at D:\bai\node_modules\bluebird\js\release\method.js:15:34
    at RouteStream._read (D:\bai\node_modules\hexo\lib\hexo\router.js:47:5)
    at RouteStream.Readable.read (node:internal/streams/readable:487:10)
    at resume_ (node:internal/streams/readable:987:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

点开本地的网站显示一直在加载,没反应,停电之前是能正常启动的
感谢!!

img

  • 写回答

1条回答 默认 最新

  • 北下关吴中生 人工智能领域优质创作者 2022-11-28 11:51
    关注

    如果确定停电之前能够正常运行,那代码应该没问题,只需要重新部署一下即可。
    步骤就是用hexo clean命令清除已生成的/public文件,然后hexo g重新生成,再根据hexo s进行本地化调试即可,命令如下:
    hexo clean && hexo g && hexo s

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 12月6日
  • 已采纳回答 11月28日
  • 创建了问题 11月23日

悬赏问题

  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持