MelodyHub

没有伞的孩子必须努力奔跑!|

DF3uTI.png

​ 第一次安装GitBook时,不管是gitbook -V还是gitbook init后,都停止在Installing GitBook 3.2.3 ……

​ 通过控制台的报错提示,怀疑是:``gitbook-cli引用了旧版的graceful-fs`,导致出现该问题。

解决

  • 需要更新graceful-fs
  1. 进入gitbook-cli全局安装目录的node依赖文件夹node_modules
1
F:\programs\nodejs\node_modules\gitbook-cli\node_modules\npm\node_modules
  1. 更新graceful-fs库:
1
2
# cmd执行以下命令
npm install graceful-fs@laster --save
  1. 再次执行gitbook -Vgitbook init

DF3lff.png

出现以上原因是设置代理的错误,我们可以采用以下方式

1
2
npm config rm proxy
npm config rm https-proxy

然后你可以安装淘宝的cnpm,这样你下载东西的速度可能提升很多,毕竟是国内的

1
npm install -g cnpm --registry=[https://registry.npm.taobao.org](https://link.jianshu.com/?t=https%3A%2F%2Fregistry.npm.taobao.org)

然后你用cnpm安装包


博客内容遵循 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 协议

本站使用 Hexo 作为驱动引擎 , 总浏览量为 次 , 总访客数为
载入天数...载入时分秒...