Skip to content

Solved: Gitbook build fails with “Template render error”

2017 October 18
by Tedb0t

I’ve been using Gitbook to host some documentation, and finding it buggy and poorly documented at present. For instance, today I wrangled with a failed build that produced this error message:

error: error while generating page "README.md": 

Template render error: (/root/.gitbook/versions/3.2.3/node_modules/gitbook-plugin-search/_layouts/website/page.html)
  TypeError: Path must be a string. Received undefined

You’ll never guess what caused it! Empty links in my SUMMARY.md. Yep. ‘Summary.md’ is the file that describes the overall content structure. If you have any bulletted lines that are not links, like this:

Section Title
- [Article](Link)
- Article that is not a link

The build will fail with that inscrutable, unhelpful error message. Sigh. Hope this helps someone out there. What makes this all the more sad and frustrating is that this is a platform for hosting documentation that is poorly documented! Seriously, look at their page for update failures—it’s empty. Great.

Related Posts:

  • No Related Posts


Comments are closed.