Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果,您使用了hexo5.0,且使用了Related popular posts插件,可能引起错误。 #66

Closed
3 tasks done
aixiu opened this issue Jul 30, 2020 · 5 comments
Closed
3 tasks done
Labels
Bug Something isn't working Hexo Plugin Solved

Comments

@aixiu
Copy link

aixiu commented Jul 30, 2020

Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。

Issue Checklist


Expected behavior

Actual behavior

  • Links to demo site with this issue:
  • Links to repository or source code of the blog:
  • Screenshots:

Steps to reproduce the behavior

hexo clean
hexo g
FATAL {
  err: TypeError: Cannot read property 'length' of undefined
      at module.exports (E:\My_blog\node_modules\hexo-related-popular-posts\lib\cache.js:26:89)
      at Hexo.<anonymous> (E:\My_blog\node_modules\hexo-related-popular-posts\index.js:171:34)
      at Hexo.tryCatcher (E:\My_blog\node_modules\bluebird\js\release\util.js:16:23)
      at Hexo.<anonymous> (E:\My_blog\node_modules\bluebird\js\release\method.js:15:34)
      at E:\My_blog\node_modules\hexo\lib\extend\filter.js:67:52
      at tryCatcher (E:\My_blog\node_modules\bluebird\js\release\util.js:16:23)
      at Object.gotValue (E:\My_blog\node_modules\bluebird\js\release\reduce.js:166:18)
      at Object.gotAccum (E:\My_blog\node_modules\bluebird\js\release\reduce.js:155:25)
      at Object.tryCatcher (E:\My_blog\node_modules\bluebird\js\release\util.js:16:23)
      at Promise._settlePromiseFromHandler (E:\My_blog\node_modules\bluebird\js\release\promise.js:547:31)
      at Promise._settlePromise (E:\My_blog\node_modules\bluebird\js\release\promise.js:604:18)
      at Promise._settlePromiseCtx (E:\My_blog\node_modules\bluebird\js\release\promise.js:641:10)
      at _drainQueueStep (E:\My_blog\node_modules\bluebird\js\release\async.js:97:12)
      at _drainQueue (E:\My_blog\node_modules\bluebird\js\release\async.js:86:9)
      at Async._drainQueues (E:\My_blog\node_modules\bluebird\js\release\async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (E:\My_blog\node_modules\bluebird\js\release\async.js:15:14)
      at processImmediate (internal/timers.js:456:21)
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html

Environment Information

Node.js and NPM Information

$ node -v && npm -v
v12.16.1
6.13.4

Package dependencies Information


Hexo Configuration

NexT Configuration

related_posts:
  enable: true
  title: # Custom header, leave empty to use the default one
  display_in_home: false
  params:
    maxCount: 5
    #PPMixingRate: 0.0
    #isDate: false
    #isImage: false
    #isExcerpt: false

Other Information

hexo-theme-next/_config.yml

Lines 277 to 288 in 5883e29

# Related popular posts
# Dependencies: https://github.com/tea3/hexo-related-popular-posts
related_posts:
enable: false
title: # Custom header, leave empty to use the default one
display_in_home: false
params:
maxCount: 5
#PPMixingRate: 0.0
#isDate: false
#isImage: false
#isExcerpt: false

如果有使用的,请把 enable: true 改为 false 即可。

@aixiu aixiu added the Bug Something isn't working label Jul 30, 2020
@stevenjoezhang
Copy link
Member

stevenjoezhang commented Jul 30, 2020

能否提供一下你所使用的 hexo-related-popular-posts 插件的版本?谢谢

看上去这是一个由于调用 Hexo 私有 API 产生的 bug,应该已经在今年一月份左右被修复了: tea3/hexo-related-popular-posts#22

@aixiu
Copy link
Author

aixiu commented Jul 30, 2020

$ npm ls --depth 0
hexo-site@0.0.0 E:\My_blog
+-- hexo@5.0.0
+-- hexo-abbrlink@2.2.1
+-- hexo-baidu-url-submit@0.0.6
+-- hexo-deployer-git@2.1.0
+-- hexo-generator-archive@1.0.0
+-- hexo-generator-baidu-sitemap@0.1.9
+-- hexo-generator-category@1.0.0
+-- hexo-generator-feed@2.2.0
+-- hexo-generator-index@1.0.0
+-- hexo-generator-searchdb@1.3.2
+-- hexo-generator-sitemap@2.0.0
+-- hexo-generator-tag@1.0.0
+-- hexo-next-tag@0.3.0 (github:theme-next/hexo-next-tag#095ca82d63db8e6e5231fa9a811d3d68f3d8cc88)
+-- hexo-next-utteranc@1.0.0 (github:theme-next/hexo-next-utteranc#f592272a73cb47923f25443709786942f0398a69)
+-- hexo-related-popular-posts@4.0.0
+-- hexo-renderer-ejs@1.0.0
+-- hexo-renderer-marked@3.0.0
+-- hexo-renderer-stylus@1.1.0
+-- hexo-server@1.0.0
+-- hexo-util@2.2.0
+-- hexo-word-counter@0.0.2
`-- shelljs@0.8.4

所有的插件版本,hexo-related-popular-posts@4.0.0,主题配置文件。

# Related popular posts 相关热门贴子
# Dependencies: https://github.com/tea3/hexo-related-popular-posts
related_posts:
  enable: true
  title: # Custom header, leave empty to use the default one
  display_in_home: false
  params:
    maxCount: 5
    #PPMixingRate: 0.0
    #isDate: false
    #isImage: false
    #isExcerpt: fals

@aixiu aixiu changed the title 如果,你使用了hexo5.0,且使用了Related popular posts插件,可能引起错误。 如果,您使用了hexo5.0,且使用了Related popular posts插件,可能引起错误。 Jul 30, 2020
@stevenjoezhang
Copy link
Member

stevenjoezhang commented Jul 30, 2020

4.0.0 是 hexo-related-popular-posts 的最新版本,有问题的话可能得在这里反馈一下了: https://github.com/tea3/hexo-related-popular-posts/issues

更新: tea3/hexo-related-popular-posts#27

@aixiu
Copy link
Author

aixiu commented Aug 6, 2020

问题解决:
请使用 npm install hexo-related-popular-posts@5.0.0 --save 安装最新版。见:tea3/hexo-related-popular-posts#27

@github-actions
Copy link

github-actions bot commented Aug 7, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. It is possible issue was solved or at least outdated. Feel free to open new for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working Hexo Plugin Solved
Projects
None yet
Development

No branches or pull requests

2 participants