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 条评论

暂无评论
立即
投稿
发表
评论
返回
顶部