Hexo-报错解决记录

2021-08-24 11:49:00 浏览数 (1)

hexo generate (hexo g)

Cannot read property ‘count’ of undefined

代码语言:javascript复制
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
TypeError: Cannot read property 'count' of undefined
    at Hexo.module.exports (C:UsersLDesktopMyBlog-materynode_moduleshexo-baidu-url-submitlibgenerator.js:4:41)
    at Hexo.tryCatcher (C:UsersLDesktopMyBlog-materynode_modulesbluebirdjsreleaseutil.js:16:23)
    at Hexo. (C:UsersLDesktopMyBlog-materynode_modulesbluebirdjsreleasemethod.js:15:34)
    at C:UsersLDesktopMyBlog-materynode_moduleshexolibhexoqipao.js:380:22
    at tryCatcher (C:UsersLDesktopMyBlog-materynode_modulesbluebirdjsreleaseutil.js:16:23)
    at MappingPromiseArray._promiseFulfilled (C:UsersLDesktopMyBlog-materynode_modulesbluebirdjsreleasemap.js:68:38)
    at MappingPromiseArray.PromiseArray._iterate (C:UsersLDesktopMyBlog-materynode_modulesbluebirdjsreleasepromise_array.js:115:31)
    at MappingPromiseArray.init (C:UsersLDesktopMyBlog-materynode_modulesbluebirdjsreleasepromise_array.js:79:10)
    at MappingPromiseArray._asyncInit (C:UsersLDesktopMyBlog-materynode_modulesbluebirdjsreleasemap.js:37:10)
    at _drainQueueStep (C:UsersLDesktopMyBlog-materynode_modulesbluebirdjsreleaseasync.js:97:12)
    at _drainQueue (C:UsersLDesktopMyBlog-materynode_modulesbluebirdjsreleaseasync.js:86:9)
    at Async._drainQueues (C:UsersLDesktopMyBlog-materynode_modulesbluebirdjsreleaseasync.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (C:UsersLDesktopMyBlog-materynode_modulesbluebirdjsreleaseasync.js:15:14)
    at processImmediate (internal/timers.js:439:21)

因百度主动提交插件导致,已安装插件却未完成 _config.yml的信息完善

解决方案

完善_config.yml

删除百度主动推送插件

部署或本地预览网页为空白

运行hexo g 命令没有问题,但是编辑器打开 public 文件生成的 index.html中代码未自动生成

因node.js的版本过高

解决方案

降低node.js版本,建议使用node.js (12.13.0)

node.js 12.X版本传送门

代码高亮问题({}被编译成#234)

在你博客的根目录。 输入指令 npm uninstall hexo --save 卸载 现在的版本 在输入 npm install hexo@加要安装的版本 --save即可

eg:npm install hexo@4.2.0 --save

卜蒜子统计未显示问题

matery.css中添加如下代码

代码语言:javascript复制
#busuanzi_container_site_pv,
#busuanzi_value_site_pv,
#busuanzi_container_site_uv {
    display: inline !important;
}

0 人点赞