用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)
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.