MaLuns / hexo-theme-async

一个简单而轻量级的 Hexo 主题。 | A simple, lightweight Hexo theme.
https://hexo-theme-async.imalun.com
MIT License
335 stars 40 forks source link

hexo 报错 #2

Closed blyspyder closed 2 years ago

blyspyder commented 2 years ago

你好我在使用你的hexo主题时,出现下面的错误,请问要怎么解决呢? Unhandled rejection ReferenceError: F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout\index.ejs:62 60|

61| <% page.posts.each(function(post,postIndex){ %>

62| <%- partial('./_partial/post-card',{ post }) %> 63| <% }) %> 64|

65|

F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout_partial\post-card.ejs:26 24| 25|

  • 26| <%= wordcount(post.content) %> 27|

  • 28| 29|

    wordcount is not defined at eval (F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout_partial\post-card.ejs:36:7) at post-card (F:\MyHexoBlogs\myblogs\node_modules\ejs\lib\ejs.js:682:17) at _View._compiledSync (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\theme\view.js:132:24) at _View.renderSync (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\theme\view.js:59:25) at Object.partial (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\plugins\helper\partial.js:34:15) at eval (F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout\index.ejs:50:17) at _Query.forEach (F:\MyHexoBlogs\myblogs\node_modules\warehouse\lib\query.js:36:7) at eval (F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout\index.ejs:47:19) at index (F:\MyHexoBlogs\myblogs\node_modules\ejs\lib\ejs.js:682:17) at _View._compiled (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\theme\view.js:136:50) at _View.render (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\theme\view.js:39:17) at F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\hexo\index.js:64:21 at tryCatcher (F:\MyHexoBlogs\myblogs\node_modules\bluebird\js\release\util.js:16:23) at F:\MyHexoBlogs\myblogs\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (F:\MyHexoBlogs\myblogs\nodemodules\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)

    Unhandled rejection ReferenceError: F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout\index.ejs:62 60| 61| <% page.posts.each(function(post,postIndex){ %>

    62| <%- partial('./_partial/post-card',{ post }) %> 63| <% }) %> 64| 65|

    F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout_partial\post-card.ejs:26 24| 25|

  • 26| <%= wordcount(post.content) %> 27|

  • 28| 29|

    wordcount is not defined at eval (F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout_partial\post-card.ejs:36:7) at post-card (F:\MyHexoBlogs\myblogs\node_modules\ejs\lib\ejs.js:682:17) at _View._compiledSync (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\theme\view.js:132:24) at _View.renderSync (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\theme\view.js:59:25) at Object.partial (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\plugins\helper\partial.js:34:15) at eval (F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout\index.ejs:50:17) at _Query.forEach (F:\MyHexoBlogs\myblogs\node_modules\warehouse\lib\query.js:36:7) at eval (F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout\index.ejs:47:19) at index (F:\MyHexoBlogs\myblogs\node_modules\ejs\lib\ejs.js:682:17) at _View._compiled (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\theme\view.js:136:50) at _View.render (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\theme\view.js:39:17) at F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\hexo\index.js:64:21 at tryCatcher (F:\MyHexoBlogs\myblogs\node_modules\bluebird\js\release\util.js:16:23) at F:\MyHexoBlogs\myblogs\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (F:\MyHexoBlogs\myblogs\nodemodules\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)

    Unhandled rejection ReferenceError: F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout\index.ejs:62 60| 61| <% page.posts.each(function(post,postIndex){ %>

    62| <%- partial('./_partial/post-card',{ post }) %> 63| <% }) %> 64| 65|

    F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout_partial\post-card.ejs:26 24| 25|

  • 26| <%= wordcount(post.content) %> 27|

  • 28| 29|

    wordcount is not defined at eval (F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout_partial\post-card.ejs:36:7) at post-card (F:\MyHexoBlogs\myblogs\node_modules\ejs\lib\ejs.js:682:17) at _View._compiledSync (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\theme\view.js:132:24) at _View.renderSync (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\theme\view.js:59:25) at Object.partial (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\plugins\helper\partial.js:34:15) at eval (F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout\index.ejs:50:17) at _Query.forEach (F:\MyHexoBlogs\myblogs\node_modules\warehouse\lib\query.js:36:7) at eval (F:\MyHexoBlogs\myblogs\themes\hexo-theme-async\layout\index.ejs:47:19) at index (F:\MyHexoBlogs\myblogs\node_modules\ejs\lib\ejs.js:682:17) at _View._compiled (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\theme\view.js:136:50) at _View.render (F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\theme\view.js:39:17) at F:\MyHexoBlogs\myblogs\node_modules\hexo\lib\hexo\index.js:64:21 at tryCatcher (F:\MyHexoBlogs\myblogs\node_modules\bluebird\js\release\util.js:16:23) at F:\MyHexoBlogs\myblogs\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (F:\MyHexoBlogs\myblogs\nodemodules\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)

    MaLuns commented 2 years ago

    安装 hexo-wordcoun