jerryc127 / hexo-theme-butterfly

🦋 A Hexo Theme: Butterfly
https://butterfly.js.org
Apache License 2.0
7.1k stars 1.28k forks source link

[Bug]: Unhandled rejection TypeError: E:\Hexo\leilei\themes\butterfly\layout\includes\widget\index.pug:35 #1516

Closed GLking123 closed 3 months ago

GLking123 commented 3 months ago

使用的 Butterfly 版本? | What version of Butterfly are you use?

最新

是否修改过主题文件? || Has the theme files been modified?

是 (Yes)

使用的瀏覽器? || What browse are you using?

Chrome

使用的系統? || What operating system are you using?

Windows

依賴插件 | Package dependencies Information

hexo-site@0.0.0 E:\Hexo\leilei
├── hexo-butterfly-clock@1.0.7
├── hexo-butterfly-swiper@1.0.12
├── hexo-generator-archive@2.0.0
├── hexo-generator-category@2.0.0
├── hexo-generator-index@3.0.0
├── hexo-generator-tag@2.0.0
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-marked@6.3.0
├── hexo-renderer-stylus@3.0.1
├── hexo-server@3.0.0
├── hexo-theme-landscape@1.0.0
└── hexo@7.2.0

問題描述 | Describe the bug

Unhandled rejection TypeError: E:\Hexo\leilei\themes\butterfly\layout\includes\widget\index.pug:35 33| !=partial('includes/widget/card_tags', {}, {cache: true}) 34| !=partial('includes/widget/card_archives', {}, {cache: true})

35| !=partial('includes/widget/card_webinfo', {}, {cache: true}) 36| !=partial('includes/widget/card_bottom_self', {}, {cache: true})

E:\Hexo\leilei\themes\butterfly\layout\includes\widget\card_webinfo.pug:19 17| .webinfo-item 18| .item-name=_p('aside.card_webinfo.site_wordcount') + " :"

19| .item-count=totalcount(site) 20| if theme.busuanzi.site_uv 21| .webinfo-item 22| .item-name= _p('aside.card_webinfo.site_uv_name') + " :"

totalcount is not a function at eval (eval at wrap (E:\Hexo\node_modules\pug-runtime\wrap.js:6:10), :58:57) at template (eval at wrap (E:\Hexo\node_modules\pug-runtime\wrap.js:6:10), :101:7) at _View._compiledSync (E:\Hexo\leilei\node_modules\hexo\dist\theme\view.js:120:32) at _View.renderSync (E:\Hexo\leilei\node_modules\hexo\dist\theme\view.js:62:29) at E:\Hexo\leilei\node_modules\hexo\dist\plugins\helper\partial.js:25:56 at Cache.apply (E:\Hexo\leilei\node_modules\hexo-util\dist\cache.js:22:21) at Object.fragmentCache (E:\Hexo\leilei\node_modules\hexo\dist\plugins\helper\fragment_cache.js:9:26) at Object.partial (E:\Hexo\leilei\node_modules\hexo\dist\plugins\helper\partial.js:25:21) at eval (eval at wrap (E:\Hexo\node_modules\pug-runtime\wrap.js:6:10), :1869:46) at template (eval at wrap (E:\Hexo\node_modules\pug-runtime\wrap.js:6:10), :5818:7) at _View._compiled (E:\Hexo\leilei\node_modules\hexo\dist\theme\view.js:123:67) at _View.render (E:\Hexo\leilei\node_modules\hexo\dist\theme\view.js:48:21) at E:\Hexo\leilei\node_modules\hexo\dist\hexo\index.js:60:29 at tryCatcher (E:\Hexo\leilei\node_modules\bluebird\js\release\util.js:16:23) at E:\Hexo\leilei\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (E:\Hexo\leilei\nodemodules\hexo\dist\hexo\router.js:43:9) at Readable.read (node:internal/streams/readable:737:12) at resume (node:internal/streams/readable:1255:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

出現問題網站 | Website

本地调试

jerryc127 commented 3 months ago

不看文档? https://butterfly.js.org/posts/98d20436/#wordcount-is-not-a-function-totalcount-is-not-a-function