hexo next主題中遇到的問題以及各種錯誤彙總,記錄下來。
釋出文章遇到:
Unhandled rejection Template render error: (unknown path) [Line 265, Column 814]
unexpected token: .
at Object._prettifyError (/Users/leesin/Desktop/blog/node_modules/nunjucks/src/lib.js:36:11)
at Template.render (/Users/leesin/Desktop/blog/node_modules/nunjucks/src/environment.js:524:21)
at Environment.renderString (/Users/leesin/Desktop/blog/node_modules/nunjucks/src/environment.js:362:17)
at Promise (/Users/leesin/Desktop/blog/node_modules/hexo/lib/extend/tag.js:66:9)
at Promise._execute (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/debuggability.js:313:9)
at Promise._resolveFromExecutor (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/promise.js:483:18)
at new Promise (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/promise.js:79:10)
at Tag.render (/Users/leesin/Desktop/blog/node_modules/hexo/lib/extend/tag.js:64:10)
at Object.tagFilter [as onRenderEnd] (/Users/leesin/Desktop/blog/node_modules/hexo/lib/hexo/post.js:230:16)
at Promise.then.then.result (/Users/leesin/Desktop/blog/node_modules/hexo/lib/hexo/render.js:65:19)
at 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._settlePromise0 (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/promise.js:694:18)
at _drainQueueStep (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/async.js:138:12)
at _drainQueue (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/async.js:131:9)
at Async._drainQueues (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/async.js:147:5)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/leesin/Desktop/blog/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
一般是markdown合適不對,找到對應的檔案(上面不顯示,可以通過二分法進行刪除排除法,找到錯誤的),刪除,google說是/{/{/}/}不能在{}中包{}
釋出文章的時候出現錯誤:
Template render error: (unknown path) [Line 7, Column 23]
Error: Unable to callthe return value of (posts["first"])["updated"]["toISOString"]
, which is undefined or falsey
at Object.exports.prettifyError (D:\itxuye\node_modules\nunjucks\src\lib.js:34:15)
at D:\itxuye\node_modules\nunjucks\src\environment.js:485:31
at root [as rootRenderFunc](eval at %28D:itxuyenode_modulesnunjuckssrcenvironment.js:564:24%29, :161:3)
at Obj.extend.render (D:\itxuye\node_modules\nunjucks\src\environment.js:478:15)
at Hexo.module.exports (D:\itxuye\node_modules\hexo-generator-feed\lib\generator.js:28:22)
at Hexo.tryCatcher (D:\itxuye\node_modules\bluebird\js\release\util.js:16:23)
at Hexo. (D:\itxuye\node_modules\bluebird\js\release\method.js:15:34)
at D:\itxuye\node_modules\hexo\lib\hexo\index.js:337:24
at tryCatcher (D:\itxuye\node_modules\bluebird\js\release\util.js:16:23)
at MappingPromiseArray._promiseFulfilled (D:\itxuye\node_modules\bluebird\js\release\map.js:57:38)
at MappingPromiseArray.PromiseArray._iterate (D:\itxuye\node_modules\bluebird\js\release\promise_array.js:113:31)
_posts檔案中不能一篇文章都沒有,可能是我上面的二分法給全部刪除文章了出現問題。