I had same problem.
I think seems to be dependancy problem with latest version for graceful-fs.
Change the graceful-fs version solves the problem.
My environment is :
OS : macOS Big Sur
node : v12.22.1
npm : v6.14.12
gitbook-cli : gitbook-cli@2.3.2
graceful-fs : 4.1.4
try this :
$ npm i -g gitbook-cli
$ cd /usr/local/lib/node_modules/gitbook-cli
$ npm i graceful-fs@4.1.4 --save
$ cd /usr/local/lib/node_modules/gitbook-cli/node_modules/npm
$ npm i graceful-fs@4.1.4 --save
$ cd {your gitbook directory}
$ gitbook init
$ gitbook serve
info: 7 plugins are installed
info: loading plugin "livereload"... OK
info: loading plugin "highlight"... OK
info: loading plugin "search"... OK
info: loading plugin "lunr"... OK
info: loading plugin "sharing"... OK
info: loading plugin "fontsettings"... OK
info: loading plugin "theme-default"... OK
info: found 1 pages
info: found 0 asset files
info: >> generation finished with success in 0.2s !
Starting server ...
Serving book on http://localhost:4000
发表评论 取消回复