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

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信小程序

微信扫一扫体验

立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部