hexojs/hexo-renderer-markdown-it

TypeError: Cannot read property 'config' of null

eephyne opened this issue · 3 comments

On a fresh hexo initialized folder with default renderer removed and it installed I got this
[error] HexoError: Process failed: _posts/hello-world.md
TypeError: Cannot read property 'config' of null
at module.exports (/home/pi/build/oldandnew-test-mar
kdown-it/node_modules/hexo-renderer-markdown-it/lib/rend
erer.js:7:24)
at /usr/lib/node_modules/hexo/lib/extend/renderer.js
:78:38
at b (domain.js:183:18)
at Domain.run (domain.js:123:23)
at store.(anonymous function) (/usr/lib/node_modules
/hexo/lib/extend/renderer.js:77:9)
at /usr/lib/node_modules/hexo/lib/core/render.js:96:
9
at fn (/usr/lib/node_modules/hexo/node_modules/async
/lib/async.js:641:34)
at Object._onImmediate (/usr/lib/node_modules/hexo/n
ode_modules/async/lib/async.js:557:34)
at processImmediate [as _immediateCallback](timers.
js:354:15)

Where does it come from?

I'm using stable hexo build 2.8.3

This could be two things.

  1. The package is only compatible with Hexo 3.0 (currently in RC)
  2. There's a bug that's exposed because the renderer config is not present in _config.yml.

Have you configured the renderer?

Yes I did but since it's only compatible with hexo 3 I guess it come from here. I don't use the rc yet because of bug in theme and crash when creating new page

I've not actually tested it on the 2.8.3 version, so I was only guessing.

I'll update the docs so others know that is only compatible with the 3.0.0 version.