[root@Hexo-Blog-Server blog]# hexo s INFO Start processing INFO Generating Baidu urls for last 100 posts INFO Posts urls generated in baidu_urls.txt
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html Template render error: (unknown path) [Line 8, Column 25] Error: Unable to call `the return value of (posts["first"])["updated"]["toISOString"]`, which is undefined or falsey at Object._prettifyError (/root/blog/node_modules/nunjucks/src/lib.js:36:11) at /root/blog/node_modules/nunjucks/src/environment.js:567:19 at Template.root [as rootRenderFunc] (eval at _compile (/root/blog/node_modules/nunjucks/src/environment.js:637:18), <anonymous>:235:3) at Template.render (/root/blog/node_modules/nunjucks/src/environment.js:556:10) at Hexo.module.exports (/root/blog/node_modules/hexo-generator-feed/lib/generator.js:41:24) at Hexo.tryCatcher (/root/blog/node_modules/bluebird/js/release/util.js:16:23) at Hexo.<anonymous> (/root/blog/node_modules/bluebird/js/release/method.js:15:34) at /root/blog/node_modules/hexo/lib/hexo/index.js:318:20 at tryCatcher (/root/blog/node_modules/bluebird/js/release/util.js:16:23) at MappingPromiseArray._promiseFulfilled (/root/blog/node_modules/bluebird/js/release/map.js:61:38) at MappingPromiseArray.PromiseArray._iterate (/root/blog/node_modules/bluebird/js/release/promise_array.js:114:31) at MappingPromiseArray.init (/root/blog/node_modules/bluebird/js/release/promise_array.js:78:10) at MappingPromiseArray._asyncInit (/root/blog/node_modules/bluebird/js/release/map.js:30:10) at _drainQueueStep (/root/blog/node_modules/bluebird/js/release/async.js:142:12) at _drainQueue (/root/blog/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/root/blog/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues [as _onImmediate] (/root/blog/node_modules/bluebird/js/release/async.js:17:14) at processImmediate (internal/timers.js:439:21)
解决方法:
查看是否安装了hexo-generator-feed插件,执行以下命令:
1 2 3
[root@Hexo-Blog-Server blog]# npm list hexo-generator-feed hexo-site@0.0.0 /root/blog └── hexo-generator-feed@2.0.0
方法一:Hexo站点目录下的source/_post目录中添加文章
Hexo站点目录下的source/_post目录中不能一片文章都没有,可以使用 hexo new <title> 命令创建新文章,也可以使用Markdown编辑器编写好文章之后上传到source/_post目录中,这样再执行 hexo s 命令启动Hexo进行前台预览时,就不会报错了。
Unhandled rejection TypeError: Cannot set property 'lastIndex' of undefined at highlight (/Users/leesin/Desktop/blog/node_modules/highlight.js/lib/highlight.js:511:35) at /Users/leesin/Desktop/blog/node_modules/highlight.js/lib/highlight.js:561:21 at Array.forEach (<anonymous>) at Object.highlightAuto (/Users/leesin/Desktop/blog/node_modules/highlight.js/lib/highlight.js:560:40) at /Users/leesin/Desktop/blog/node_modules/hexo-util/lib/highlight.js:117:25 at highlight (/Users/leesin/Desktop/blog/node_modules/hexo-util/lib/highlight.js:120:7) at highlightUtil (/Users/leesin/Desktop/blog/node_modules/hexo-util/lib/highlight.js:22:14) at /Users/leesin/Desktop/blog/node_modules/hexo/lib/plugins/filter/before_post_render/backtick_code_block.js:62:15 at String.replace (<anonymous>) at Hexo.backtickCodeBlock (/Users/leesin/Desktop/blog/node_modules/hexo/lib/plugins/filter/before_post_render/backtick_code_block.js:14:31) at Hexo.tryCatcher (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/util.js:16:23) at Hexo.<anonymous> (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/method.js:15:34) at Promise.each.filter (/Users/leesin/Desktop/blog/node_modules/hexo/lib/extend/filter.js:63:65) at tryCatcher (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/util.js:16:23) at Object.gotValue (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/reduce.js:155:18) at Object.gotAccum (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/reduce.js:144:25) at Object.tryCatcher (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/promise.js:512:31) at Promise._settlePromise (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/promise.js:569:18) at Promise._settlePromiseCtx (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/promise.js:606:10) at _drainQueueStep (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/async.js:142:12) at _drainQueue (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/async.js:131:9)