Skip to content

Problems getting the docs to work locally with gitbook #41

@paulleader

Description

@paulleader

I'm trying to get gitbook working locally so I can see what I'm doing when I edit the docs.

I've installed gitbooks as per the instructions at (https://github.com/GitbookIO/gitbook)

However when I try to run the local server I get the following...

$ gitbook serve --debug
Live reload server started on port: 35729
Press CTRL+C to quit ...

info: loading book configuration....
warn: you should specify a gitbook version to use in your book.json, for example: 2.x.x
info: OK
info: load plugin gitbook-plugin-livereload ....OK
info: >> 1 plugins loaded
info: Parsing multilingual book, with 2 languages
info: Preparing language book en
info: Preparing language book ja
info: loading book configuration....OK
info: load plugin gitbook-plugin-livereload ....OK
info: >> 1 plugins loaded
info: loading book configuration....OK
info: load plugin gitbook-plugin-livereload ....OK
info: >> 1 plugins loaded

Template render error: expected variable end
    at Error.exports.TemplateError (/Users/pml/.gitbook/versions/2.0.2/node_modules/nunjucks/src/lib.js:51:19)
    at Object.extend.fail (/Users/pml/.gitbook/versions/2.0.2/node_modules/nunjucks/src/parser.js:64:15)
    at Object.extend.advanceAfterVariableEnd (/Users/pml/.gitbook/versions/2.0.2/node_modules/nunjucks/src/parser.js:133:18)
    at Object.extend.parseNodes (/Users/pml/.gitbook/versions/2.0.2/node_modules/nunjucks/src/parser.js:1159:22)
    at Object.extend.parseAsRoot (/Users/pml/.gitbook/versions/2.0.2/node_modules/nunjucks/src/parser.js:1177:42)
    at Object.module.exports.parse (/Users/pml/.gitbook/versions/2.0.2/node_modules/nunjucks/src/parser.js:1199:18)
    at Object.module.exports.compile (/Users/pml/.gitbook/versions/2.0.2/node_modules/nunjucks/src/compiler.js:1118:48)
    at Obj.extend._compile (/Users/pml/.gitbook/versions/2.0.2/node_modules/nunjucks/src/environment.js:444:35)
    at Obj.extend.compile (/Users/pml/.gitbook/versions/2.0.2/node_modules/nunjucks/src/environment.js:433:18)
    at null.<anonymous> (/Users/pml/.gitbook/versions/2.0.2/node_modules/nunjucks/src/environment.js:378:22)

So I get one warning about a missing gitbook version (but that seems ok), but then it fails in the middle of parsing something.

Any idea what the issue might be? The error message is spectacularly unhelpful to the uninitiated :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions