Skip to content
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

Hexo 3.2.0-beta.2 test result report #1627

Closed
Xuanwo opened this issue Dec 6, 2015 · 16 comments
Closed

Hexo 3.2.0-beta.2 test result report #1627

Xuanwo opened this issue Dec 6, 2015 · 16 comments

Comments

@Xuanwo
Copy link
Contributor

Xuanwo commented Dec 6, 2015

ref: https://travis-ci.org/Xuanwo/xuanwo.github.io/builds/95182069

build 400, historic time

I meet a TypeError: Cannot set property 'lastIndex' of undefined error, and error message as below

41.76s$ hexo g
INFO  Start processing
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
TypeError: Cannot set property 'lastIndex' of undefined
    at highlight (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/highlight.js/lib/highlight.js:460:35)
    at /home/travis/build/Xuanwo/xuanwo.github.io/node_modules/highlight.js/lib/highlight.js:513:21
    at Array.forEach (native)
    at Object.highlightAuto (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/highlight.js/lib/highlight.js:509:20)
    at highlight (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/hexo-util/lib/highlight.js:98:19)
    at module.exports (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/hexo-util/lib/highlight.js:21:14)
    at /home/travis/build/Xuanwo/xuanwo.github.io/node_modules/hexo/lib/plugins/filter/before_post_render/backtick_code_block.js:49:15
    at String.replace (native)
    at Hexo.backtickCodeBlock (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/hexo/lib/plugins/filter/before_post_render/backtick_code_block.js:15:31)
    at Hexo.tryCatcher (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/util.js:11:23)
    at Hexo.<anonymous> (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/method.js:15:34)
    at /home/travis/build/Xuanwo/xuanwo.github.io/node_modules/hexo/lib/extend/filter.js:68:35
    at tryCatcher (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/util.js:11:23)
    at Object.gotValue (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/reduce.js:145:18)
    at Object.gotAccum (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/reduce.js:134:25)
    at Object.tryCatcher (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/util.js:11:23)
    at Promise._settlePromiseFromHandler (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/promise.js:489:31)
    at Promise._settlePromise (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/promise.js:546:18)
    at Promise._settlePromiseCtx (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/promise.js:583:10)
    at Async._drainQueue (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/async.js:134:12)
    at Async._drainQueues (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/async.js:139:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/async.js:16:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
The command "hexo g" exited with 1.
60.72s$ hexo d
INFO  Start processing
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
TypeError: Cannot set property 'lastIndex' of undefined
    at highlight (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/highlight.js/lib/highlight.js:460:35)
    at /home/travis/build/Xuanwo/xuanwo.github.io/node_modules/highlight.js/lib/highlight.js:513:21
    at Array.forEach (native)
    at Object.highlightAuto (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/highlight.js/lib/highlight.js:509:20)
    at highlight (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/hexo-util/lib/highlight.js:98:19)
    at module.exports (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/hexo-util/lib/highlight.js:21:14)
    at /home/travis/build/Xuanwo/xuanwo.github.io/node_modules/hexo/lib/plugins/filter/before_post_render/backtick_code_block.js:49:15
    at String.replace (native)
    at Hexo.backtickCodeBlock (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/hexo/lib/plugins/filter/before_post_render/backtick_code_block.js:15:31)
    at Hexo.tryCatcher (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/util.js:11:23)
    at Hexo.<anonymous> (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/method.js:15:34)
    at /home/travis/build/Xuanwo/xuanwo.github.io/node_modules/hexo/lib/extend/filter.js:68:35
    at tryCatcher (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/util.js:11:23)
    at Object.gotValue (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/reduce.js:145:18)
    at Object.gotAccum (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/reduce.js:134:25)
    at Object.tryCatcher (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/util.js:11:23)
    at Promise._settlePromiseFromHandler (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/promise.js:489:31)
    at Promise._settlePromise (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/promise.js:546:18)
    at Promise._settlePromiseCtx (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/promise.js:583:10)
    at Async._drainQueue (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/async.js:134:12)
    at Async._drainQueues (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/async.js:139:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/bluebird/js/release/async.js:16:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
The command "hexo d" exited with 1.

@tommy351

@Xuanwo Xuanwo added the bug Something isn't working label Dec 6, 2015
@Xuanwo
Copy link
Contributor Author

Xuanwo commented Dec 6, 2015

set auto_detect to false fixed.

and test results are as below:
before(3.1.1):

INFO  Files loaded in 41 s
INFO  731 files generated in 24 s
Elapsed time 2 min 6 sec

after(3.2.0-beta.2):

INFO  Files loaded in 6.54 s
INFO  731 files generated in 25 s
Elapsed time 1 min 20 sec

This is the cold start time, as the cache added, hot start will be quicker.

@Xuanwo Xuanwo added discussion and removed bug Something isn't working labels Dec 6, 2015
@Xuanwo Xuanwo changed the title Hexo 3.2.0-beta.2 error report Hexo 3.2.0-beta.2 test result report Dec 6, 2015
@leesei
Copy link
Member

leesei commented Dec 8, 2015

I think we should recommend setting highlight.js's auto detect to false in the document.
It is causing quite a lot of issues.

@Xuanwo
Copy link
Contributor Author

Xuanwo commented Dec 8, 2015

Yes, It used to save a lot time for don't need to choose language, but at this time, it looks like just resulting more and more problems.

@tommy351
Copy link
Member

tommy351 commented Dec 8, 2015

It's disabled by default in Hexo 3.2.

@leesei
Copy link
Member

leesei commented Dec 8, 2015

@tommy351 do you mean disabling the config?
It's still true in hexo-starter.
https://github.com/hexojs/hexo-starter/blob/master/_config.yml#L43

@tommy351
Copy link
Member

tommy351 commented Dec 8, 2015

hexo-starter is not updated yet. But it has been disabled in hexo core.
https://github.com/hexojs/hexo/blob/master/lib/hexo/default_config.js#L37

@leesei
Copy link
Member

leesei commented Dec 8, 2015

But the default config will be overwritten by config value, isn't it?
I'll create PR on hexo-starter.

@Xuanwo
Copy link
Contributor Author

Xuanwo commented Dec 8, 2015

I think we can remove the auto-detect option from _config.yml, and educate people form the rule that add specific language for codeblocks.

@leesei
Copy link
Member

leesei commented Dec 8, 2015

@Xuanwo I second the idea. We can override the value and state in documentation that it will be hardcoded. Actually we could also set lang to plain if it is missing.

mitsuruog added a commit to mitsuruog/blog.mitsuruog.info that referenced this issue Feb 4, 2016
refs Hexo 3.2.0-beta.2 test result report · Issue #1627 · hexojs/hexo hexojs/hexo#1627
@leesei
Copy link
Member

leesei commented Feb 29, 2016

Track in #1786

@leesei leesei closed this as completed Feb 29, 2016
@Waydrow
Copy link

Waydrow commented Mar 28, 2016

I meet this problem too. I have been troubled for a whole day. Thanks very much. It's working!!

zhaochunqi added a commit to zhaochunqi/zhaochunqi.github.io that referenced this issue Apr 10, 2016
@lovexiaov
Copy link

set auto_detect to false solved my problem.

1 similar comment
@cyang812
Copy link

set auto_detect to false solved my problem.

@masikkk
Copy link

masikkk commented May 29, 2016

met this prob, thank you!

@Mran
Copy link

Mran commented Jul 14, 2016

i met this issue too.And my problem was due to that i didn't specify language for the code in markdown.so,you should specify your code language.May it can help you.

@yugasun
Copy link

yugasun commented Apr 24, 2017

I have solved the problem by changing auto_detect to false too~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants