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

Problems getting the docs to work locally with gitbook #41

Open
paulleader opened this issue May 19, 2015 · 3 comments
Open

Problems getting the docs to work locally with gitbook #41

paulleader opened this issue May 19, 2015 · 3 comments

Comments

@paulleader
Copy link
Contributor

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 :)

@paulleader
Copy link
Contributor Author

ping

Any suggestions? This is the first time I've used GitBook so I'm a bit stumped.

@rubydesign
Copy link
Contributor

Moi,
i still use the old editor desktop application they released and that works fine for my book.
You could try that https://github.com/GitbookIO/editor-legacy

@5t111111
Copy link
Member

I've encountered the same problem after updating gitbook-cli.

Gitbook fails to parse /README.md because it doesn't correctly interpret {{ and }} in that file in both ja and es, I don't know why though.

I've fixed the one in ja/README.md but there still might be a problem with es/README.md, so if you still have this problem and want gitbook to work locally, you can change {{ y }} to something like {{y}} or simply remove it for a workaround.

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

No branches or pull requests

3 participants