Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hexo server的时候报Template render error : (unknown path) [Line 7, Column 23] #79

Open
itxuye opened this issue Aug 10, 2016 · 9 comments

Comments

@itxuye
Copy link

@itxuye itxuye commented Aug 10, 2016

Template render error: (unknown path) [Line 7, Column 23]
Error: Unable to call the 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)
at MappingPromiseArray.init (D:\itxuye\node_modules\bluebird\js\release\promise_array.js:77:10)
at new MappingPromiseArray (D:\itxuye\node_modules\bluebird\js\release\map.js:25:10)
at map (D:\itxuye\node_modules\bluebird\js\release\map.js:152:12)
at Function.Promise.map (D:\itxuye\node_modules\bluebird\js\release\map.js:160:12)
at D:\itxuye\node_modules\hexo\lib\hexo\index.js:334:20
at tryCatcher (D:\itxuye\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (D:\itxuye\node_modules\bluebird\js\release\promise.js:504:31)
at Promise._settlePromise (D:\itxuye\node_modules\bluebird\js\release\promise.js:561:18)
at Promise._settlePromise0 (D:\itxuye\node_modules\bluebird\js\release\promise.js:606:10)
at Promise._settlePromises (D:\itxuye\node_modules\bluebird\js\release\promise.js:685:18)
at Async._drainQueue (D:\itxuye\node_modules\bluebird\js\release\async.js:138:16)
02:09:00.737 DEBUG Generator: asset
02:09:00.741 DEBUG Database saved
02:09:00.742 FATAL (unknown path) [Line 7, Column 23]
Error: Unable to call the return value of (posts["first"])["updated"]["toISOString"], which is undefined or falsey
Template render error: (unknown path) [Line 7, Column 23]
Error: Unable to call the 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)
at MappingPromiseArray.init (D:\itxuye\node_modules\bluebird\js\release\promise_array.js:77:10)
at new MappingPromiseArray (D:\itxuye\node_modules\bluebird\js\release\map.js:25:10)
at map (D:\itxuye\node_modules\bluebird\js\release\map.js:152:12)
at Function.Promise.map (D:\itxuye\node_modules\bluebird\js\release\map.js:160:12)
at D:\itxuye\node_modules\hexo\lib\hexo\index.js:334:20
at tryCatcher (D:\itxuye\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (D:\itxuye\node_modules\bluebird\js\release\promise.js:504:31)
at Promise._settlePromise (D:\itxuye\node_modules\bluebird\js\release\promise.js:561:18)
at Promise._settlePromise0 (D:\itxuye\node_modules\bluebird\js\release\promise.js:606:10)
at Promise._settlePromises (D:\itxuye\node_modules\bluebird\js\release\promise.js:685:18)
at Async._drainQueue (D:\itxuye\node_modules\bluebird\js\release\async.js:138:16)

What is the problem?How can i solve it ~~~

@baifan

This comment has been minimized.

Copy link

@baifan baifan commented Aug 28, 2016

I got the same problem . Anyone can give some help?

FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Template render error: (unknown path) [Line 7, Column 23]
  Error: Unable to call `the return value of (posts["first"])["updated"]["toISOString"]`, which is undefined or falsey
    at Object.exports.prettifyError (/home/bash/workspace/hexo/baifan/node_modules/nunjucks/src/lib.js:34:15)
    at /home/bash/workspace/hexo/baifan/node_modules/nunjucks/src/environment.js:485:31
    at root [as rootRenderFunc] (eval at <anonymous> (/home/bash/workspace/hexo/baifan/node_modules/nunjucks/src/environment.js:564:24), <anonymous>:161:3)
    at Obj.extend.render (/home/bash/workspace/hexo/baifan/node_modules/nunjucks/src/environment.js:478:15)
    at Hexo.module.exports (/home/bash/workspace/hexo/baifan/node_modules/hexo-generator-feed/lib/generator.js:28:22)
    at Hexo.tryCatcher (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/util.js:16:23)
    at Hexo.<anonymous> (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/method.js:15:34)
    at /home/bash/workspace/hexo/baifan/node_modules/hexo/lib/hexo/index.js:337:24
    at tryCatcher (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/util.js:16:23)
    at MappingPromiseArray._promiseFulfilled (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/map.js:57:38)
    at MappingPromiseArray.PromiseArray._iterate (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/promise_array.js:113:31)
    at MappingPromiseArray.init (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/promise_array.js:77:10)
    at new MappingPromiseArray (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/map.js:25:10)
    at map (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/map.js:152:12)
    at Function.Promise.map (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/map.js:160:12)
    at /home/bash/workspace/hexo/baifan/node_modules/hexo/lib/hexo/index.js:334:20
    at tryCatcher (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/promise.js:509:31)
    at Promise._settlePromise (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/promise.js:566:18)
    at Promise._settlePromise0 (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/promise.js:611:10)
    at Promise._settlePromises (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/promise.js:690:18)
    at Async._drainQueue (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/async.js:138:16)
FATAL (unknown path) [Line 7, Column 23]
  Error: Unable to call `the return value of (posts["first"])["updated"]["toISOString"]`, which is undefined or falsey
Template render error: (unknown path) [Line 7, Column 23]
  Error: Unable to call `the return value of (posts["first"])["updated"]["toISOString"]`, which is undefined or falsey
    at Object.exports.prettifyError (/home/bash/workspace/hexo/baifan/node_modules/nunjucks/src/lib.js:34:15)
    at /home/bash/workspace/hexo/baifan/node_modules/nunjucks/src/environment.js:485:31
    at root [as rootRenderFunc] (eval at <anonymous> (/home/bash/workspace/hexo/baifan/node_modules/nunjucks/src/environment.js:564:24), <anonymous>:161:3)
    at Obj.extend.render (/home/bash/workspace/hexo/baifan/node_modules/nunjucks/src/environment.js:478:15)
    at Hexo.module.exports (/home/bash/workspace/hexo/baifan/node_modules/hexo-generator-feed/lib/generator.js:28:22)
    at Hexo.tryCatcher (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/util.js:16:23)
    at Hexo.<anonymous> (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/method.js:15:34)
    at /home/bash/workspace/hexo/baifan/node_modules/hexo/lib/hexo/index.js:337:24
    at tryCatcher (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/util.js:16:23)
    at MappingPromiseArray._promiseFulfilled (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/map.js:57:38)
    at MappingPromiseArray.PromiseArray._iterate (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/promise_array.js:113:31)
    at MappingPromiseArray.init (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/promise_array.js:77:10)
    at new MappingPromiseArray (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/map.js:25:10)
    at map (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/map.js:152:12)
    at Function.Promise.map (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/map.js:160:12)
    at /home/bash/workspace/hexo/baifan/node_modules/hexo/lib/hexo/index.js:334:20
    at tryCatcher (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/promise.js:509:31)
    at Promise._settlePromise (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/promise.js:566:18)
    at Promise._settlePromise0 (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/promise.js:611:10)
    at Promise._settlePromises (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/promise.js:690:18)
    at Async._drainQueue (/home/bash/workspace/hexo/baifan/node_modules/bluebird/js/release/async.js:138:16)

@jiqiujia

This comment has been minimized.

Copy link

@jiqiujia jiqiujia commented Aug 31, 2016

I got the same error, too

1 similar comment
@Bestfeel

This comment has been minimized.

Copy link

@Bestfeel Bestfeel commented Sep 22, 2016

I got the same error, too

@XuYanci

This comment has been minimized.

Copy link

@XuYanci XuYanci commented Oct 8, 2016

perhaps you delete _posts hello-world.md file , this will cause problem . how to fix it .

@vsxen

This comment has been minimized.

Copy link

@vsxen vsxen commented Oct 13, 2016

此问题 我好像遇到过,

---
title: test
date: 2016-10-13 12:08:46
tags:
---

这个没有写正确吧

@XuYanci

This comment has been minimized.

Copy link

@XuYanci XuYanci commented Oct 13, 2016

in _posts ,if there is no file , it will cause this error .

@hansomesong

This comment has been minimized.

Copy link

@hansomesong hansomesong commented Oct 21, 2016

I have encountered the same issue.

I think the cause is: incompatibility of plugins: hexo-generator-sitemap, hexo-generator-feed and hexo3.

So when I comment the two aforementioned plugins, the command "hexo g" passed!

@jzm1994

This comment has been minimized.

Copy link

@jzm1994 jzm1994 commented Mar 17, 2017

插件 hexo-generate-feed 还有 hexo-generate-sitemap 和 hexo3 不兼容!

@HJHL

This comment has been minimized.

Copy link

@HJHL HJHL commented May 27, 2017

I have encountered the same problem too. Finally I find it's because I deleted all the posts in source/_post/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants
You can’t perform that action at this time.