next-theme / hexo-theme-next

🎉 Elegant and powerful theme for Hexo.
https://theme-next.js.org
Other
2.41k stars 426 forks source link

Cannot read property 'anime' of undefined #337

Closed Yngda closed 3 years ago

Yngda commented 3 years ago

Hexo 运行环境及版本: NexT version 8.7.0 Documentation: https://theme-next.js.org

hexo: 5.4.0 hexo-cli: 4.3.0 os: win32 10.0.19042 node: 14.17.4 v8: 8.4.371.23-node.76 uv: 1.41.0 zlib: 1.2.11 brotli: 1.0.9 ares: 1.17.1 modules: 83 nghttp2: 1.42.0 napi: 8 llhttp: 2.1.3 openssl: 1.1.1k cldr: 39.0 icu: 69.1 tz: 2021a unicode: 13.0

问题描述:在本地运行 hexo g 命令后出现以下错误代码:

Process failed: %s _config.yml
FATAL {
  err: TypeError: Cannot read property 'anime' of undefined
      at module.exports (E:\Hexo\Hexo\blog\themes\next\scripts\events\lib\vendors.js:24:16)
      at Hexo.<anonymous> (E:\Hexo\Hexo\blog\themes\next\scripts\events\index.js:9:27)
      at Hexo.tryCatcher (E:\Hexo\Hexo\blog\node_modules\bluebird\js\release\util.js:16:23)
      at Hexo.<anonymous> (E:\Hexo\Hexo\blog\node_modules\bluebird\js\release\method.js:15:34)
      at E:\Hexo\Hexo\blog\node_modules\hexo\lib\extend\filter.js:67:52
      at tryCatcher (E:\Hexo\Hexo\blog\node_modules\bluebird\js\release\util.js:16:23)
      at Object.gotValue (E:\Hexo\Hexo\blog\node_modules\bluebird\js\release\reduce.js:166:18)
      at Object.gotAccum (E:\Hexo\Hexo\blog\node_modules\bluebird\js\release\reduce.js:155:25)
      at Object.tryCatcher (E:\Hexo\Hexo\blog\node_modules\bluebird\js\release\util.js:16:23)
      at Promise._settlePromiseFromHandler (E:\Hexo\Hexo\blog\node_modules\bluebird\js\release\promise.js:547:31)
      at Promise._settlePromise (E:\Hexo\Hexo\blog\node_modules\bluebird\js\release\promise.js:604:18)
      at Promise._settlePromiseCtx (E:\Hexo\Hexo\blog\node_modules\bluebird\js\release\promise.js:641:10)
      at _drainQueueStep (E:\Hexo\Hexo\blog\node_modules\bluebird\js\release\async.js:97:12)
      at _drainQueue (E:\Hexo\Hexo\blog\node_modules\bluebird\js\release\async.js:86:9)
      at Async._drainQueues (E:\Hexo\Hexo\blog\node_modules\bluebird\js\release\async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (E:\Hexo\Hexo\blog\node_modules\bluebird\js\release\async.js:15:14)
      at processImmediate (internal/timers.js:464:21)
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html
welcome[bot] commented 3 years ago

Thanks for opening this issue, maintainers will get back to you as soon as possible!

stevenjoezhang commented 3 years ago

Can you provide the content of NexT config file?

Yngda commented 3 years ago

经检查 NexT config 文件,是 _postdata 下的一行设置:updated_at: 书写错误 :

原文,即错误内容是: post_meta: item_text: true created_at: true updated_at: true enable: true another_day: true categories: true

修改后,即正确内容为: post_meta: item_text: true created_at: true updated_at: enable: true another_day: true categories: true

删掉 updated_at: 后的true,问题解决。

github-actions[bot] commented 2 years ago

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.