-
Notifications
You must be signed in to change notification settings - Fork 8
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
报错TypeError: tmpPost.categories.join is not a function #13
Comments
你打开文件 D:\hexo\blog\node_modules\hexo-auto-category\lib\logic.js 加一行代码测试看看呢? // 3.2 prevents duplicate file changes
log.i(tmpPost.categories); // 添加这一行,打印看看
if (tmpPost.categories && (tmpPost.categories.join("_") == newCategories.join("_"))) return data;
tmpPost.categories = newCategories |
除了之前的报错,还打印出了我的一些博文的文件夹信息.我是每个文件夹下有一些博文,为啥有的文件夹打印好多次? |
看不出来什么原因,再打印一下 type呢? log.i(typeof(tmpPost.categories));
log.i(tmpPost.categories); |
嗯,打印之后是: |
是不是因为出现了一个string类型 |
谢谢大神, 成功解决. 我把对应那个 hexo 文件夹下的博文的原来自己写的 categories 删除掉,就好了耶. 我看好像是我那里的 categories 格式不太对, 所以报错了. 谢谢 |
hexo g 时报错,卸载掉hexo-auto-category 就没事儿,所以应该还是它的问题,想问问该怎么办?
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html TypeError: tmpPost.categories.join is not a function at Hexo.logic (D:\hexo\blog\node_modules\hexo-auto-category\lib\logic.js:33:55) at Hexo.tryCatcher (D:\hexo\blog\node_modules\bluebird\js\release\util.js:16:23) at Hexo.<anonymous> (D:\hexo\blog\node_modules\bluebird\js\release\method.js:15:34) at Promise.each.filter (D:\hexo\blog\node_modules\hexo\lib\extend\filter.js:60:50) at tryCatcher (D:\hexo\blog\node_modules\bluebird\js\release\util.js:16:23) at Object.gotValue (D:\hexo\blog\node_modules\bluebird\js\release\reduce.js:155:18) at Object.gotAccum (D:\hexo\blog\node_modules\bluebird\js\release\reduce.js:144:25) at Object.tryCatcher (D:\hexo\blog\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (D:\hexo\blog\node_modules\bluebird\js\release\promise.js:517:31) at Promise._settlePromise (D:\hexo\blog\node_modules\bluebird\js\release\promise.js:574:18) at Promise._settlePromise0 (D:\hexo\blog\node_modules\bluebird\js\release\promise.js:619:10) at Promise._settlePromises (D:\hexo\blog\node_modules\bluebird\js\release\promise.js:699:18) at _drainQueueStep (D:\hexo\blog\node_modules\bluebird\js\release\async.js:138:12) at _drainQueue (D:\hexo\blog\node_modules\bluebird\js\release\async.js:131:9) at Async._drainQueues (D:\hexo\blog\node_modules\bluebird\js\release\async.js:147:5) at Immediate.Async.drainQueues [as _onImmediate] (D:\hexo\blog\node_modules\bluebird\js\release\async.js:17:14) at runCallback (timers.js:705:18) at tryOnImmediate (timers.js:676:5) at processImmediate (timers.js:658:5)
The text was updated successfully, but these errors were encountered: