Molunerfinn / hexo-theme-melody

:musical_keyboard:A simple & beautiful & fast theme for Hexo.
https://molunerfinn.com
Other
1.59k stars 213 forks source link

Unhandled rejection TypeError: E:\blog\themes\melody\layout\includes\layout.pug:11 #249

Closed paynexss closed 4 years ago

paynexss commented 4 years ago

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 || ''

11| - var pageKeywords = (config.keywords || []).join(',') 12| - if (page.tags && page.tags.data) pageKeywords = page.tags.data.map(function(tag) {return tag.name;}).join(',') 13| - var pageAuthor = config.email ? config.author + ',' + config.email : config.author
14| - var pageCopyright = config.copyright || config.author

(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 (_streamreadable.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 || ''

11| - var pageKeywords = (config.keywords || []).join(',') 12| - if (page.tags && page.tags.data) pageKeywords = page.tags.data.map(function(tag) {return tag.name;}).join(',') 13| - var pageAuthor = config.email ? config.author + ',' + config.email : config.author
14| - var pageCopyright = config.copyright || config.author

(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 (_streamreadable.js:490:10) at resume (_stream_readable.js:975:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)

Molunerfinn commented 4 years ago

前几天刚有人发过。请你发找找之前的issue

Amos58 commented 3 years ago

我也有这个问题

starsfalldown commented 2 years ago

me too

xiaolong0201 commented 2 years ago

怎么解决的???

Molunerfinn commented 2 years ago

可以翻之前的issue: https://github.com/Molunerfinn/hexo-theme-melody/issues/58

xiaolong0201 commented 2 years ago

好像错的地方不太一样,我几乎小白,实在不知道怎么回事 下面是报错提示 Unhandled rejection TypeError: D:\Blog\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:\Blog\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:\Blog\node_modules\pug-runtime\wrap.js:6:10), :8:105) at template (eval at wrap (D:\Blog\node_modules\pug-runtime\wrap.js:6:10), :26:7) at _View._compiledSync (D:\Blog\node_modules\hexo\lib\theme\view.js:132:24) at _View.renderSync (D:\Blog\node_modules\hexo\lib\theme\view.js:59:25) at D:\Blog\node_modules\hexo\lib\plugins\helper\partial.js:31:52 at Cache.apply (D:\Blog\node_modules\hexo-util\lib\cache.js:27:46) at Object.fragmentCache (D:\Blog\node_modules\hexo\lib\plugins\helper\fragment_cache.js:11:34) at Object.partial (D:\Blog\node_modules\hexo\lib\plugins\helper\partial.js:31:17) at eval (eval at wrap (D:\Blog\node_modules\pug-runtime\wrap.js:6:10), :1699:46) at template (eval at wrap (D:\Blog\node_modules\pug-runtime\wrap.js:6:10), :5122:7) at _View._compiled (D:\Blog\node_modules\hexo\lib\theme\view.js:136:50) at _View.render (D:\Blog\node_modules\hexo\lib\theme\view.js:39:17) at D:\Blog\node_modules\hexo\lib\hexo\index.js:64:21 at tryCatcher (D:\Blog\node_modules\bluebird\js\release\util.js:16:23) at D:\Blog\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (D:\Blog\nodemodules\hexo\lib\hexo\router.js:47:5) at RouteStream.Readable.read (node:internal/streams/readable:487:10) at resume (node:internal/streams/readable:988:12) at processTicksAndRejections (node:internal/process/task_queues:83:21)

Molunerfinn commented 2 years ago

hexo-theme-butterfly

额,你这个是hexo-theme-butterfly 不是hexo-theme-melody

xiaolong0201 commented 2 years ago

我知道我知道,看着问题比较像嘛,就想问问,还是很感谢。

jonein commented 1 year ago

请问这个问题解决了吗?我翻了两天没找到解决办法

jonein commented 1 year ago

我知道我知道,看着问题比较像嘛,就想问问,还是很感谢。

请问你的问题解决了吗,