gitbook 版本
CLI version: 2.3.2
GitBook version: 3.2.3
在使用 gitbook 生成文档时,发现编译偶尔不规律性地出现错误
PS E:\workdoc> npm run build
(node:1828) ExperimentalWarning: The fs.promises API is experimental
(node:16444) ExperimentalWarning: The fs.promises API is experimental
> workdoc@1.0.0 build
> gitbook build . D:/server/nginx-1.22.0/web/gitbook
info: 13 plugins are installed
info: 7 explicitly listed
info: loading plugin "search-plus"... OK
info: loading plugin "chapter-fold"... OK
info: loading plugin "hide-element"... OK
info: loading plugin "code"... OK
info: loading plugin "back-to-top-button"... OK
info: loading plugin "theme-default"... OK
info: found 83 pages
info: found 175 asset files
warn: "options" property is deprecated, use config.get(key) instead
warn: "options.generator" property is deprecated, use "output.name" instead
Error: ENOENT: no such file or directory, stat 'D:\server\nginx-1.22.0\web\gitbook\gitbook\gitbook-plugin-back-to-top-button\plugin.css'
npm ERR! code 1
npm ERR! path E:\workdoc
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c "gitbook build . D:/server/nginx-1.22.0/web/gitbook"
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache\_logs\2023-04-21T03_09_34_338Z-debug.log
解决方法
修改 C:\Users\Administrator.gitbook\versions\3.2.3\lib\output\website\copyPluginAssets.js 文件中的 112 行
将 confirm: true 改为 confirm: false