hexo-theme-fluid icon indicating copy to clipboard operation
hexo-theme-fluid copied to clipboard

hexo g报错,但不影响使用

Open Mars13333 opened this issue 3 years ago • 1 comments

ERROR TypeError: /Users/edy/csy.github.io/node_modules/hexo-theme-fluid/layout/category.ejs:12 10| %> 11|

12| <%- partial('_partials/archive-list.ejs', { params: { key: page.layout, postTotal: cat ? cat.posts.length : 0 } }) %> 13|

/Users/edy/csy.github.io/node_modules/hexo-theme-fluid/layout/_partials/archive-list.ejs:5 3|


4| <% var dateCursor %>

5| <% page.posts.each(function (post) { %> 6| <% if(date(post.date, "YYYY") !== dateCursor) { %> 7| <% dateCursor = date(post.date, "YYYY") %> 8|

<%= dateCursor %>

Cannot read property 'each' of undefined at eval (eval at compile (/Users/edy/csy.github.io/node_modules/ejs/lib/ejs.js:673:12), :18:19) at archive-list (/Users/edy/csy.github.io/node_modules/ejs/lib/ejs.js:703:17) at _View._compiledSync (/Users/edy/csy.github.io/node_modules/hexo/lib/theme/view.js:132:24) at _View.renderSync (/Users/edy/csy.github.io/node_modules/hexo/lib/theme/view.js:59:25) at Object.partial (/Users/edy/csy.github.io/node_modules/hexo/lib/plugins/helper/partial.js:34:15) at eval (eval at compile (/Users/edy/csy.github.io/node_modules/ejs/lib/ejs.js:673:12), :23:17) at category (/Users/edy/csy.github.io/node_modules/ejs/lib/ejs.js:703:17) at _View._compiled (/Users/edy/csy.github.io/node_modules/hexo/lib/theme/view.js:136:50) at _View.render (/Users/edy/csy.github.io/node_modules/hexo/lib/theme/view.js:39:17) at /Users/edy/csy.github.io/node_modules/hexo/lib/hexo/index.js:64:21 at tryCatcher (/Users/edy/csy.github.io/node_modules/bluebird/js/release/util.js:16:23) at /Users/edy/csy.github.io/node_modules/bluebird/js/release/method.js:15:34 at RouteStream.read (/Users/edy/csy.github.io/node_modules/hexo/lib/hexo/router.js:47:5) at RouteStream.Readable.read (internal/streams/readable.js:481:10) at resume (internal/streams/readable.js:968:12)

Mars13333 avatar Feb 23 '23 09:02 Mars13333

请检查本地环境,正常不会报这个错误

zkqiang avatar Mar 03 '23 15:03 zkqiang