折腾:
【已解决】Mac中卸载gitbook和重新安装gitbook
期间,已经可以开始用:
1 | npm install -g gitbook |
去安装了。但是速度看起来很慢的样子:

去想办法,看看能否加速。
1 2 3 4 5 | ✘ xxx@xx ~ cat ~ / .npmrc registry = https: / / registry.npm.taobao.org / ELECTRON_MIRROR = http: / / npm.taobao.org / mirrors / electron / proxy = http: / / 127.0 . 0.1 : 58591 / https - proxy = http: / / 127.0 . 0.1 : 58591 |
去掉代理。用默认的淘宝的源,感觉速度会快点
去编辑:
1 | xxx@xx ~ vi ~/.npmrc |
去掉代理:
1 2 3 4 5 | xxx@xx ~ cat ~ / .npmrc registry = https: / / registry.npm.taobao.org / ELECTRON_MIRROR = http: / / npm.taobao.org / mirrors / electron / #proxy=http://127.0.0.1:58591/ #https-proxy=http://127.0.0.1:58591 |
但是速度依旧慢
难道是源的问题?
npm 源
1 | npm --registry https: //registry .npm.taobao.org install -g gitbook |
确定用了的是淘宝的源
但是好像也还是慢啊
怀疑是代理还在?
再去试试:
npm 去掉代理
1 | npm config delete proxy |
果然:
1 2 3 | ~ cat ~ / .npmrc registry = https: / / registry.npm.taobao.org / ELECTRON_MIRROR = http: / / npm.taobao.org / mirrors / electron / |
就去掉了。
速度依然慢:

但是凑合着继续吧。
感觉是:即使是淘宝的npm的源,速度也依旧很慢?
还是本身gitbook要安装的东西太多,所以实际速度快,只是看起来慢?
【总结】
后续确认此处,已的确用上了淘宝的源,下载速度算是正常的。
只不过本身gitbook所依赖的包太多,所以进度很慢而已。
转载请注明:在路上 » 【已解决】Mac中用npm安装gitbook想办法提高下载速度