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

More detailed information for "Template render error: (unknown path)" #4109

Closed
2 tasks
TingxunShi opened this issue Jan 29, 2020 · 2 comments
Closed
2 tasks
Labels

Comments

@TingxunShi
Copy link

Check List

Please check followings before submitting a new feature request.

  • I have already read Docs page
  • I have already searched existing issues

Feature Request

Currently I am stucking with a very common issue: hexo failed to generate pages, gave the following information

[myname@myname-pc blog_src]$ hexo g
INFO  Start processing
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Template render error: (unknown path)
  Error: expected end of comment, got end of file
    at Object._prettifyError (/home/myname/Projects/blog_src/node_modules/nunjucks/src/lib.js:36:11)
    at Template.render (/home/myname/Projects/blog_src/node_modules/nunjucks/src/environment.js:542:21)
    at Environment.renderString (/home/myname/Projects/blog_src/node_modules/nunjucks/src/environment.js:380:17)
    at /home/myname/Projects/blog_src/node_modules/hexo/lib/extend/tag.js:120:48
    at tryCatcher (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/util.js:16:23)
    at Function.Promise.fromNode.Promise.fromCallback (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/promise.js:209:30)
    at Tag.render (/home/myname/Projects/blog_src/node_modules/hexo/lib/extend/tag.js:120:18)
    at Object.onRenderEnd (/home/myname/Projects/blog_src/node_modules/hexo/lib/hexo/post.js:288:20)
    at /home/myname/Projects/blog_src/node_modules/hexo/lib/hexo/render.js:64:19
    at tryCatcher (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:439:21)

even add --debug option seems it was rendering all markdown files, but it didn't show which file caused the failure

Could you please kindly add more detailed information for this error? It would be perfect to have

  • The bad file
  • The bad line
  • Recommended modification (e.g. change {{ to { {)

Many thanks

Others

@stevenjoezhang
Copy link
Member

stevenjoezhang commented Mar 23, 2020

In fact, the details of the error message are limited by nunjucks. Maybe you can open an Issue here: https://github.com/mozilla/nunjucks/issues

#1771 (comment)

@stale
Copy link

stale bot commented May 30, 2020

This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

2 participants