hexojs / hexo-renderer-markdown-it

Markdown-it is a Markdown parser, done right. A faster and CommonMark compliant alternative for Hexo.
MIT License
349 stars 60 forks source link

Cannot read property 'render' of undefined #8

Closed uuangian closed 9 years ago

uuangian commented 9 years ago

After init new hexo , uninstall renderer-md and installed this reander in win7, when i run hexo g,

there are some errors. I am not sure there is something wrong whith bluebird

TypeError: Cannot read property 'render' of undefined at Hexo.module.exports (e:\myweb\t3\node_modules\hexo-renderer-markdown-it\lib\renderer.js:14:46) at Hexo.tryCatcher (e:\myweb\t3\node_modules\hexo\node_modules\bluebird\js\main\util.js:24:31) at Hexo. (e:\myweb\t3\node_modules\hexo\node_modules\bluebird\js\main\method.js:15:34) at e:\myweb\t3\node_modules\hexo\lib\hexo\render.js:51:21 at tryCatcher (e:\myweb\t3\node_modules\hexo\node_modules\bluebird\js\main\util.js:24:31) at Promise._settlePromiseFromHandler (e:\myweb\t3\node_modules\hexo\node_modules\bluebird\js\main\promise.js:454:31) at Promise._settlePromiseAt (e:\myweb\t3\node_modules\hexo\node_modules\bluebird\js\main\promise.js:530:18) at Promise._settlePromiseAtPostResolution (e:\myweb\t3\node_modules\hexo\node_modules\bluebird\js\main\promise.js:224:10) at Async._drainQueue (e:\myweb\t3\node_modules\hexo\node_modules\bluebird\js\main\async.js:180:12) at Async._drainQueues (e:\myweb\t3\node_modules\hexo\node_modules\bluebird\js\main\async.js:185:10) at Immediate.Async.drainQueues as _onImmediate at processImmediate as _immediateCallback

The environment is: hexo: 3.0.0 os: win7 32bit

celsomiranda commented 9 years ago

What's your node version?

I don't have windows7 installed but I can't reproduce this in win8.1

celsomiranda commented 9 years ago

Oh I got it. This happens because you haven't set any options in the _config.yml file.

Will correct this

uuangian commented 9 years ago

worked fine.

celsomiranda commented 9 years ago

Thanks.

Now, if no options are specified it will assume you chose 'default'.