Giter Site home page Giter Site logo

Comments (6)

xu-song avatar xu-song commented on August 23, 2024

你打开文件 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

from hexo-auto-category.

vio1etus avatar vio1etus commented on August 23, 2024

除了之前的报错,还打印出了我的一些博文的文件夹信息.我是每个文件夹下有一些博文,为啥有的文件夹打印好多次?
$ hexo g INFO Start processing INFO [ 'computer_network' ] INFO hexo INFO [ 'php' ] INFO [ 'sql_injection' ] INFO [ 'sql_injection' ] INFO [ 'sql_injection' ] INFO [ 'sql_injection' ] INFO [ 'sql_injection' ] INFO [ 'sql_injection' ] INFO [ 'sql_injection' ] INFO [ 'sql_injection' ] INFO [ 'sql_injection' ] INFO [ 'sql_injection' ] INFO [ 'sql_injection' ] INFO [ 'sql_injection' ] INFO [ 'sql_injection' ] INFO [ 'wireshark' ] INFO [ 'wireshark' ] INFO [ 'computer_network' ] INFO [ 'php' ] INFO [ 'php' ] INFO [ 'sql_injection' ] INFO [ 'sql_injection' ] INFO [ 'sql_injection' ] INFO [ 'wireshark' ] INFO [ 'wireshark' ] INFO [ 'xss' ] INFO [ 'xss' ] INFO [ 'wireshark' ] INFO [ 'wireshark' ] INFO [ 'xss' ] INFO [ 'sql_injection' ] INFO [ 'xss' ] INFO [ 'wireshark' ] INFO [ 'sql_injection' ] INFO [ 'file upload' ] 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:34: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)

from hexo-auto-category.

xu-song avatar xu-song commented on August 23, 2024

看不出来什么原因,再打印一下 type呢?

log.i(typeof(tmpPost.categories));
log.i(tmpPost.categories);  

from hexo-auto-category.

vio1etus avatar vio1etus commented on August 23, 2024

嗯,打印之后是:
$ hexo g INFO Start processing INFO object INFO [ 'computer_network' ] INFO string INFO hexo INFO object INFO [ 'php' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'wireshark' ] INFO object INFO [ 'wireshark' ] INFO object INFO [ 'computer_network' ] INFO object INFO [ 'php' ] INFO object INFO [ 'php' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'wireshark' ] INFO object INFO [ 'wireshark' ] INFO object INFO [ 'xss' ] INFO object INFO [ 'xss' ] INFO object INFO [ 'wireshark' ] INFO object INFO [ 'wireshark' ] INFO object INFO [ 'xss' ] INFO object INFO [ 'sql_injection' ] INFO object INFO [ 'xss' ] INFO object INFO [ 'wireshark' ] INFO object INFO [ 'sql_injection' ] INFO object

from hexo-auto-category.

xu-song avatar xu-song commented on August 23, 2024

是不是因为出现了一个string类型
INFO string INFO hexo
哪来的呢,

from hexo-auto-category.

vio1etus avatar vio1etus commented on August 23, 2024

谢谢大神, 成功解决. 我把对应那个 hexo 文件夹下的博文的原来自己写的 categories 删除掉,就好了耶. 我看好像是我那里的 categories 格式不太对, 所以报错了. 谢谢

from hexo-auto-category.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.