everfu / hexo-theme-solitude

一款设计师风格的 Hexo 主题,支持懒加载、PWA、Latex以及多种评论系统。
https://www.efu.me
MIT License
441 stars 38 forks source link

[Help]: 启动报错,不影响使用但是强迫症噩梦 #265

Closed VacuolePaoo closed 1 month ago

VacuolePaoo commented 1 month ago

前置确认

⚠️ 搜索issues中是否已存在类似问题

操作系统类型?

Windows

运行的Hexo版本是?

Hexo 7.0.0

你所使用的主题版本是稳定/最新?

开发板 (dev)

问题描述 😯

一开始使用的是稳定版,出现此问题后重装了一遍博客,还是不行,今天换到dev分支试了一下,还是有报错 虽不影响使用,但是不太好看 image

终端日志 📒

PS C:\Develop\Em> hexo g && hexo s --debug
INFO  Validating config
INFO
  ===================================================================
       #####  ####  #     #####  ###### #     # ######   ######
      #      #    # #       #      #    #     # #      # #
       ##### #    # #       #      #    #     # #      # ######
           # #    # #       #      #    #     # #      # #
      ######  ####  ##### #####    #      ###   ######   ######
                            1.9.3
  ===================================================================
  GitHub: https://github.com/valor-x/hexo-theme-solitude

INFO  Start processing
INFO  Files loaded in 7.79 s
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: 2023-7-10 00:00:00, _f: undefined, _strict: undefined, _locale: [object Object]
Error
    at Function.createFromInputFallback (C:\Develop\Em\node_modules\.pnpm\moment@2.30.1\node_modules\moment\moment.js:324:25)
    at configFromString (C:\Develop\Em\node_modules\.pnpm\moment@2.30.1\node_modules\moment\moment.js:2613:19)
    at configFromInput (C:\Develop\Em\node_modules\.pnpm\moment@2.30.1\node_modules\moment\moment.js:3056:13)
    at prepareConfig (C:\Develop\Em\node_modules\.pnpm\moment@2.30.1\node_modules\moment\moment.js:3039:13)
    at createFromConfig (C:\Develop\Em\node_modules\.pnpm\moment@2.30.1\node_modules\moment\moment.js:3006:44)
    at createLocalOrUTC (C:\Develop\Em\node_modules\.pnpm\moment@2.30.1\node_modules\moment\moment.js:3100:16)
    at createLocal (C:\Develop\Em\node_modules\.pnpm\moment@2.30.1\node_modules\moment\moment.js:3104:16)
    at Object.hooks (C:\Develop\Em\node_modules\.pnpm\moment@2.30.1\node_modules\moment\moment.js:16:29)
    at eval (eval at wrap (C:\Develop\Em\node_modules\.pnpm\pug-runtime@3.0.1\node_modules\pug-runtime\wrap.js:6:10), <anonymous>:8626:5)
    at template (eval at wrap (C:\Develop\Em\node_modules\.pnpm\pug-runtime@3.0.1\node_modules\pug-runtime\wrap.js:6:10), <anonymous>:16036:7)
    at _View._compiled (C:\Develop\Em\node_modules\.pnpm\hexo@7.2.0\node_modules\hexo\dist\theme\view.js:123:67)
    at _View.render (C:\Develop\Em\node_modules\.pnpm\hexo@7.2.0\node_modules\hexo\dist\theme\view.js:48:21)
    at C:\Develop\Em\node_modules\.pnpm\hexo@7.2.0\node_modules\hexo\dist\hexo\index.js:60:29
    at tryCatcher (C:\Develop\Em\node_modules\.pnpm\bluebird@3.7.2\node_modules\bluebird\js\release\util.js:16:23)
    at C:\Develop\Em\node_modules\.pnpm\bluebird@3.7.2\node_modules\bluebird\js\release\method.js:15:34
    at RouteStream._read (C:\Develop\Em\node_modules\.pnpm\hexo@7.2.0\node_modules\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)
INFO  0 files generated in 343 ms
15:43:33.761 DEBUG Writing database to C:\Develop\Em\db.json
15:43:33.774 DEBUG Hexo version: 7.2.0
15:43:33.775 DEBUG Working directory: C:\Develop\Em\
15:43:34.027 DEBUG Config loaded: C:\Develop\Em\_config.yml
15:43:34.029 INFO  Validating config
15:43:34.051 DEBUG Second Theme Config loaded: C:\Develop\Em\_config.solitude.yml
15:43:35.633 DEBUG Plugin loaded: hexo-renderer-stylus
15:43:35.634 DEBUG Plugin loaded: hexo-renderer-pug
15:43:35.634 DEBUG Plugin loaded: hexo-abbrlink
15:43:35.634 DEBUG Plugin loaded: hexo-blog-encrypt
15:43:35.635 DEBUG Plugin loaded: hexo-deployer-git
15:43:35.635 DEBUG Plugin loaded: hexo-algoliasearch
15:43:35.635 DEBUG Plugin loaded: hexo-filter-nofollow
15:43:35.636 DEBUG Plugin loaded: hexo-generator-archive
15:43:35.636 DEBUG Plugin loaded: hexo-generator-category
15:43:35.636 DEBUG Plugin loaded: hexo-generator-index
15:43:35.636 DEBUG Plugin loaded: hexo-generator-sitemap
15:43:35.637 DEBUG Plugin loaded: hexo-generator-tag
15:43:35.637 DEBUG Plugin loaded: hexo-renderer-ejs
15:43:35.638 DEBUG Plugin loaded: hexo-renderer-marked
15:43:35.638 DEBUG Plugin loaded: hexo-server
15:43:35.645 DEBUG Plugin loaded: hexo-util
15:43:35.646 DEBUG Plugin loaded: hexo-wordcount
15:43:35.680 DEBUG Script loaded: themes\solitude\scripts\event\cdn.js
15:43:35.680 DEBUG Script loaded: themes\solitude\scripts\event\init.js
15:43:35.681 DEBUG Script loaded: themes\solitude\scripts\event\merge_config.js
15:43:35.681 DEBUG Script loaded: themes\solitude\scripts\event\page.js
15:43:35.682 DEBUG Script loaded: themes\solitude\scripts\event\welcome.js
15:43:35.683 DEBUG Script loaded: themes\solitude\scripts\filter\checkThemeConfig.js
15:43:35.684 DEBUG Script loaded: themes\solitude\scripts\filter\comment.js
15:43:35.684 DEBUG Script loaded: themes\solitude\scripts\filter\default.js
15:43:35.685 DEBUG Script loaded: themes\solitude\scripts\filter\lazyload.js
15:43:35.685 DEBUG Script loaded: themes\solitude\scripts\filter\randomPosts.js
15:43:35.686 DEBUG Script loaded: themes\solitude\scripts\tags\button.js
15:43:35.686 DEBUG Script loaded: themes\solitude\scripts\tags\bvideo.js
15:43:35.687 DEBUG Script loaded: themes\solitude\scripts\tags\checkbox.js
15:43:35.687 DEBUG Script loaded: themes\solitude\scripts\tags\fold.js
15:43:35.687 DEBUG Script loaded: themes\solitude\scripts\tags\gallery.js
15:43:35.687 DEBUG Script loaded: themes\solitude\scripts\tags\image.js
15:43:35.688 DEBUG Script loaded: themes\solitude\scripts\tags\inline-image.js
15:43:35.688 DEBUG Script loaded: themes\solitude\scripts\tags\label.js
15:43:35.688 DEBUG Script loaded: themes\solitude\scripts\tags\link.js
15:43:35.689 DEBUG Script loaded: themes\solitude\scripts\tags\media.js
15:43:35.689 DEBUG Script loaded: themes\solitude\scripts\tags\mermaid.js
15:43:35.689 DEBUG Script loaded: themes\solitude\scripts\tags\note.js
15:43:35.690 DEBUG Script loaded: themes\solitude\scripts\tags\span.js
15:43:35.690 DEBUG Script loaded: themes\solitude\scripts\tags\tabs.js
15:43:35.690 DEBUG Script loaded: themes\solitude\scripts\tags\timeline.js
15:43:35.691 DEBUG Script loaded: themes\solitude\scripts\helper\getArchiveLength.js
15:43:35.691 DEBUG Script loaded: themes\solitude\scripts\helper\inject_head_js.js
15:43:35.691 DEBUG Script loaded: themes\solitude\scripts\helper\page.js
15:43:35.691 DEBUG Script loaded: themes\solitude\scripts\helper\related_post.js
15:43:35.692 DEBUG Script loaded: themes\solitude\scripts\helper\stylus.js
VacuolePaoo commented 1 month ago

这里的报错,或者说是警告吧 image

VacuolePaoo commented 1 month ago

安装主题之后安装了一些插件,启动之后报错 moment, hexo-util等,就执行了pnpm install moment --savepnpm install hexo-util --save

everfu commented 1 month ago

安装主题之后安装了一些插件,启动之后报错 moment, hexo-util等,就执行了pnpm install moment --savepnpm install hexo-util --save

试试npm包管理?pnpm没测试

everfu commented 1 month ago

安装主题之后安装了一些插件,启动之后报错 moment, hexo-util等,就执行了pnpm install moment --savepnpm install hexo-util --save

明天我去试试,可能是时间日期的问题

everfu commented 1 month ago
image

没遇到报错,看你是否是其他问题导致的,可以往时间上排,考虑是某个时间格式不严谨

everfu commented 1 month ago

没排查出来,手动将包管理换成了pnpm,遇到你说的缺少 moment、hexo-util 包的问题,手动安装一下就行(大概率是hexo init是用npm),后续执行和使用都没碰到你遇到的警告