$ hexo s
INFO Validating config
INFO Start processing
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object
at Object.extname (node:path:905:5)
at Hexo. (D:\ServerCore\blog-lsw\node_modules\hexo-theme-kratos-rebirth\scripts\search.js:19:16)
at Object.onceWrapper (node:events:633:28)
at Hexo.emit (node:events:531:35)
at Hexo._generate (D:\ServerCore\blog-lsw\node_modules\hexo\dist\hexo\index.js:380:14)
at D:\ServerCore\blog-lsw\node_modules\hexo\dist\hexo\index.js:298:25
at tryCatcher (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:729:18)
at Promise._fulfill (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:673:18)
at PromiseArray._resolve (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise_array.js:127:19)
at PromiseArray._promiseFulfilled (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise_array.js:145:14)
at Promise._settlePromise (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:609:26)
at Promise._settlePromise0 (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\async.js:102:5)
at Async.drainQueues [as _onImmediate] (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\async.js:15:14)
at process.processImmediate (node:internal/timers:483:21)
报告前须知
安装方式
使用 npm 等包管理工具安装至 node_modules 目录下
对 Bug 的描述
$ hexo s INFO Validating config INFO Start processing FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object at Object.extname (node:path:905:5) at Hexo. (D:\ServerCore\blog-lsw\node_modules\hexo-theme-kratos-rebirth\scripts\search.js:19:16)
at Object.onceWrapper (node:events:633:28)
at Hexo.emit (node:events:531:35)
at Hexo._generate (D:\ServerCore\blog-lsw\node_modules\hexo\dist\hexo\index.js:380:14)
at D:\ServerCore\blog-lsw\node_modules\hexo\dist\hexo\index.js:298:25
at tryCatcher (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:729:18)
at Promise._fulfill (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:673:18)
at PromiseArray._resolve (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise_array.js:127:19)
at PromiseArray._promiseFulfilled (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise_array.js:145:14)
at Promise._settlePromise (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:609:26)
at Promise._settlePromise0 (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\async.js:102:5)
at Async.drainQueues [as _onImmediate] (D:\ServerCore\blog-lsw\node_modules\bluebird\js\release\async.js:15:14)
at process.processImmediate (node:internal/timers:483:21)
复现的方法
1.在空白文件夹内打开Git Bash
2.执行以下命令 $ hexo init blog-lsw $ cd blog-lsw $ npm install $ npm install hexo-theme-kratos-rebirth
copy 仓库中的config.yml到博客目录,并重命名为_config.kratos-rebirth.yml
执行hexo s指令
然后就报错了
期望的行为
正常运行博客
相关的截图
运行环境
Windows 10 IoT 企业版 LTSC 21H2 19044.5011 Git:2.47.0 Nodjs:20.18.0 Hexo:7.3.0
主题配置文件
站点配置文件
No response
补充内容
No response