hexo编辑博客报错Unhandled rejection TypeError: E:\Blog\themes\butterfly\layout\includes\layout.pug:16原因

​
ERROR:

E:\blog>hexo s
INFO Start processing
INFO Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.
Unhandled rejection TypeError: E:\blog\themes\melody\layout\includes\layout.pug:11
9|
10| - var pageDescription = page.description || page.title || config.description || ''

!=partial('includes/sidebar', {}, {cache: true})



(config.keywords || []).join is not a function
at eval (eval at wrap (E:\blog\node_modules\pug-runtime\wrap.js:6:10), :20:44)
at template (eval at wrap (E:\blog\node_modules\pug-runtime\wrap.js:6:10), :1825:72)
at Theme._View.View._compiled (E:\blog\node_modules\hexo\lib\theme\view.js:123:48)
at Theme._View.View.View.render (E:\blog\node_modules\hexo\lib\theme\view.js:29:15)
at E:\blog\node_modules\hexo\lib\hexo\index.js:365:21
at tryCatcher (E:\blog\node_modules\bluebird\js\release\util.js:16:23)
at E:\blog\node_modules\bluebird\js\release\method.js:15:34
at RouteStream._read (E:\blog\node_modules\hexo\lib\hexo\router.js:123:3)
at RouteStream.Readable.read (stream_readable.js:490:10)
at resume (_stream_readable.js:975:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

Unhandled rejection TypeError: E:\blog\themes\melody\layout\includes\layout.pug:11
9|
10| - var pageDescription = page.description || page.title || config.description || ''





(config.keywords || []).join is not a function
at eval (eval at wrap (E:\blog\node_modules\pug-runtime\wrap.js:6:10), :20:44)
at template (eval at wrap (E:\blog\node_modules\pug-runtime\wrap.js:6:10), :1825:72)
at Theme._View.View._compiled (E:\blog\node_modules\hexo\lib\theme\view.js:123:48)
at Theme._View.View.View.render (E:\blog\node_modules\hexo\lib\theme\view.js:29:15)
at E:\blog\node_modules\hexo\lib\hexo\index.js:365:21
at tryCatcher (E:\blog\node_modules\bluebird\js\release\util.js:16:23)
at E:\blog\node_modules\bluebird\js\release\method.js:15:34
at RouteStream._read (E:\blog\node_modules\hexo\lib\hexo\router.js:123:3)
at RouteStream.Readable.read (stream_readable.js:490:10)
at resume (_stream_readable.js:975:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

​

今天搭建hexo报错了,我找了很多解决方案,但是很多都没有用,最后发现是D:\Blog\themes\butterfly\_config.yml也就是个人主题里面的配置文件_config.yml出现了问题,

也就是menu设置这一块地方,建议把这一块进行重置,可以试试修改为如下的版式

menu:
  主页: / || fas fa-home
  博文 || fa fa-graduation-cap:
    分类: /categories/ || fa fa-archive
    标签: /tags/ || fa fa-tags
    归档: /archives/ || fa fa-folder-open
  生活 || fas fa-list:
    分享: /shuoshuo/ || fa fa-comments-o
    相册: /photos/ || fa fa-camera-retro
    音乐: /music/ || fa fa-music
    影视: /movies/ || fas fa-video
  友链: /links/ || fa fa-link
  留言板: /comment/ || fa fa-paper-plane
  #留言板: /messageboard/ || fa fa-paper-plane
  关于笔者: /about/ || fas fa-heart  

或者

menu:
  首页: / || fa fa-home
  归档: /archives/ || fa fa-archive
  标签: /tags/ || fa fa-tags
  分类: /categories/ || fa fa-folder-open
  留言板: /messageboard/ || fa fa-paper-plane
  友链: /link/ || fa fa-link
  日志: /timeline/ || fa fa-bell
  菜单 || fa fa-list:
    - 关于 || /about/ || fa fa-sitemap
    - myself || /myself/ || fa fa-id-card
    - butterfly主题 || https://github.com/jerryc127/hexo-theme-butterfly/ || fa fa-heart

  • 6
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 7
    评论
根据你提供的引用内容,出现了一个误:ReferenceError: F:\environment\hexo\themes\wuyi\layout\post.ejs:41。 这个误是指在F:\environment\hexo\themes\wuyi\layout\post.ejs文件的第41行出现了一个引用误。根据提供的信息,我们无法确定具体的引用误是什么,因为我们不能直接看到这个文件的内容。但是根据常见的误类型,有可能是在这一行引用了一个未定义的变量或函数。 要解决这个误,你可以尝试以下几个方法: 1. 检查post.ejs文件的第41行,确保引用的变量或函数是正确的并且已经定义。如果有任何拼写误或者引用问题,修正它们。 2. 检查你的代码中是否有其他地方使用到了这个未定义的变量或函数。如果有,同样要确保它们已经正确定义。 3. 如果你不确定是哪里出现了问题,可以逐行排查代码,看看在第41行之前或之后是否有其他误。 希望这些方法能帮助你解决这个误。如果问题仍然存在,请提供更多信息,以便我们能够更好地帮助你解决问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [hexo编辑Unhandled rejection TypeError: E:\Blog\themes\butterfly\layout\includes\layout.pug:...](https://blog.csdn.net/blink182007/article/details/123892080)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [hexo更换主题hueman 出现TypeError: D:\blog\themes\hueman\layout\post.ejs:1解决方法](https://blog.csdn.net/LM306/article/details/129897843)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

光芒再现dev

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值