GitBook文档

常见错误

Here is a list of common build errors and thier associated fixes.


Error loading plugins: plugin1, ...

This error happens because GitBook can't resolve a plugin (or the plugin is invalid). External plugins need to be specified in the dependencies field of a node.js package.json file. Learn more about the package.json format.

For example, if your book depend on the Autocover plugin, you need a package.json file with the following content:

{
    "name": "mybook",
    "version": "0.0.0",
    "description": "",
    "repository": {
        "type": "git",
        "url": "https://github.com/Me/mybook.git"
    },
    "author": "Me <[email protected]>",
    "dependencies": {
        "gitbook-plugin-autocover": "0.0.5"
    }
}

Need to install ebook-convert from Calibre

This error was logged as Convert of PDF - Need to install ebook-convert from Calibre #333 on GitHub.

To get around the error while trying to build your project as a PDF, ePub or mobi ebook, you must have the Calibre eBook reader/manager installed AND the command-line tools installed.

To install the Calibre command-line tools from the Mac version, from the menu select: calibre - Preferences - Miscellaneous - Install command line tools

Once this is completed, your ebook builds will be successful.