gitbook安装与使用
参考:https://www.cnblogs.com/ajietext/p/13837750.html
首先先装nvm,为什么装这个?就是node.js各类版本的管理器,随时能切换版本。
如果遇到这种情况 只需要改下版本就可以解决了,不需要处理依赖或重装node.js等问题。
# windows 安装包
https://github.com/coreybutler/nvm-windows/releases/download/1.1.7/nvm-setup.zip
# 这里用的是v12.22.3, 网上说的是v10左右
nvm install v12.22.3
nvm use v12.22.3# 配置国内加速镜像
npm config set registry https://registry.npm.taobao.org
npm install -g gitbook-cli
nvm list
# * 16.7.0 (Currently using 64-bit executable)
npm --version
# 7.20.3
node -v
npm config set registry=https://registry.npm.taobao.org -g
找到C:\Users{用户名}.gitbook 文件夹,删除
npm uninstall -g gitbook
npm uninstall -g gitbook-cli
# 清除npm缓存
npm cache clean -f
npm install gitbook-cli -g
gitbook init
gitbook serve