在执行 gitbook build ,gitbook serve,gitbook pdf等命令均保持。报错了错误提示内容如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | info: 10 plugins are installedinfo: 9 explicitly listedinfo: loading plugin "baidu"... OKinfo: loading plugin "donate"... OKinfo: loading plugin "sitemap"... OKinfo: loading plugin "highlight"... OKinfo: loading plugin "search"... OKinfo: loading plugin "lunr"... OKinfo: loading plugin "sharing"... OKinfo: loading plugin "fontsettings"... OKinfo: loading plugin "theme-default"... OKinfo: found 24 pagesinfo: found 2 asset fileswarn: "options" property is deprecated, use config.get(key) insteadwarn: "options.generator" property is deprecated, use "output.name" insteaderror: error while generating page "README.md":TypeError: this.contentPath is not a function |
当然也有些网友的报错内容如下:
1 2 3 4 | warn: "options" property is deprecated, use config.get(key) insteadwarn: "page.progress" property is deprecatedwarn: "sections" property is deprecated, use page.content insteadTypeError: Path must be a string. Received undefined |
这种问题的原因是,gitbook的版本太低。大家执行 gitbook update 命令进行升级,升级到3.2.2版本即可。
也有网友反映,报一下的错:
1 | Error: Couldn't locate plugins "baidu, donate", Run 'gitbook install' to install plugins from registry. |
这是提示插件没有安装的错误。大家执行 gitbook install 命令完成安装即可。