用hexo做blog系统一段时间了,某一天使用
命令 hexo g
, hexo s
都报如下错误:
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Template render error: Error: Unable to call `csrf_token`, which is undefined or falsey
at Object.callWrap (/www/blog/node_modules/hexo/node_modules/nunjucks/src/runtime.js:223:15)
at root [as rootRenderFunc] (eval at <anonymous> (/www/blog/node_modules/hexo/node_modules/nunjucks/src/environment.js:450:24), <anonymous>:8:67)
at null.<anonymous> (/www/blog/node_modules/hexo/node_modules/nunjucks/src/environment.js:387:18)
at Object.exports.withPrettyErrors (/www/blog/node_modules/hexo/node_modules/nunjucks/src/lib.js:24:16)
at Obj.extend.render (/www/blog/node_modules/hexo/node_modules/nunjucks/src/environment.js:374:20)
at Obj.extend.renderString (/www/blog/node_modules/hexo/node_modules/nunjucks/src/environment.js:261:21)
at /www/blog/node_modules/hexo/lib/extend/tag.js:56:9
at tryCatcher (/www/blog/node_modules/hexo/node_modules/bluebird/js/main/util.js:26:23)
at Promise._resolveFromResolver (/www/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:476:31)
at new Promise (/www/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:69:37)
at Tag.render (/www/blog/node_modules/hexo/lib/extend/tag.js:55:10)
at Object.tagFilter [as onRenderEnd] (/www/blog/node_modules/hexo/lib/hexo/post.js:253:16)
at /www/blog/node_modules/hexo/lib/hexo/render.js:55:19
at tryCatcher (/www/blog/node_modules/hexo/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/www/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:503:31)
at Promise._settlePromiseAt (/www/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:577:18)
at Promise._settlePromises (/www/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:693:14)
at Async._drainQueue (/www/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/www/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/www/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:15:14)
at processImmediate [as _immediateCallback] (timers.js:358:17)
1
locochen OP 经过这么长时间的检查,发现时source/_post/文件下某个xxx.md文件的格式不对。导致出现这么奇怪的错误。
|
2
locochen OP 删除掉就好了。
|