目录

注意node.js 版本要和gitbook版本对应
1.先安装node.js
Download | Node.js
https://nodejs.org/en/download/
点击

找到10.23.0
一定要先看以下链接不然会报错

下载这个

.msi代表可以直接安装的版本
找到它

然后安装

然后调出cmd看看是否安装成功
输入node -v
然后回车

此时为安装成功
2.安装Git

点击下载

安装程序注意勾选


点击sublimetext
点击下载

安装

然后下载完之后回到git的安装界面
选择其他编辑器

并选择对应的subline的启动程序

然后一路向下









然后安装
然后cmd验证是否安装成功
输入git
回车

这就是安装成功了
3.gitbook安装
先验证npm是不是安装了
cmd输入npm -v
回车

然后用google下载(google的方式)
打开cmd
输入

如果网不好的话或者没有google
可以
npm install cnpm -g
再用
cmd
cnpm install gitbook-cli -g
即可
等待安装好之后
cmd输入gitbook

即为成功

此时我们还没有gitbook具体版本
所以下面进行安装
输入
gitbook ls-remote


输入
gitbook fetch 2.6.7
回车
等待安装完成验证gitbook版本安装成功
先随便找个地方创建一个文件夹

然后在地址栏输入cmd然后回车
然后在cmd里输入
gitbook init


出现这些就是成功了
summary是用来产生目录的

readme.md拖入subline出现的就是这个
然后
接着刚刚在目录里打开的cmd里输入
gitbook serve

报错解决
已经解决
问题1
在文件夹中cmd时出现
‘gitbook‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件
但是win+R cmd却可以调出gitbook
我是直接重启解决的
问题2
gitbook init的时候出现问题
直接gitbook ls
然后卸载对应版本
gitbook uninstall 2.6.7
然后直接
gitbook init

再gitbook serve就行了
其他问题
此处我是卡在了pulgins后面一步
用nvm来切换版本
-
下载nvm并安装 (推荐使用nvm-setup.zip)
Releases · coreybutler/nvm-windows · GitHub -
使用nvm命令切换node版本,即可完成安装
nvm // 会提示nvw下的相关命令 nvm ls // 查看已安装node版本 nvm install vXX // 安装对应vXX版本的node nvm uninstall> vXX // 卸载对应vXX版本的node nvm use xxx // 选择使用XXX版本安装的时候直接点点点就行了

这样就是安装成功了
再看看之前的报错信息
(node:3452) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
是版本的问题
安装稳定版本5.7.0

然后安装即可(参考以下解答)
nodejs 错误问题解决_di84186的博客-CSDN博客
又出现加载问题

Gitbook使用时出现Error loading version latest_vincentuva的博客-CSDN博客
参照以上的解决方法
给gitbook降低版本
C:\Users\hu211>npm uninstall -g gitbook
C:\Users\hu211>npm install -g gitbook-cli@2.3.0
参照以上解决方法更新npm
C:\Users\hu211>npm -g install npm@4.1.4
npm ERR! Windows_NT 10.0.19042
npm ERR! argv "E:\\node\\node.exe" "E:\\node\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "npm@4.1.4"
npm ERR! node v5.7.0
npm ERR! npm v3.6.0
npm ERR! No compatible version found: npm@4.1.4
npm ERR! Valid install targets:
npm ERR! 8.5.2, 8.5.1, 8.5.0, 8.4.1, 8.4.0, 8.3.2, 8.3.1, 8.3.0, 8.2.0, 8.1.4, 8.1.3, 8.1.2, 8.1.1, 8.1.0, 8.0.0, 7.24.2, 7.24.1, 7.24.0, 7.23.0, 7.22.0, 7.21.1, 7.21.0, 7.20.6, 7.20.5, 7.20.4, 7.20.3, 7.20.2, 7.20.1, 7.20.0, 7.19.1, 7.19.0, 7.18.1, 7.18.0, 7.17.0, 7.16.0, 7.15.1, 7.15.0, 7.14.0, 7.13.0, 7.12.1, 7.12.0, 7.11.2, 7.11.1, 7.11.0, 7.10.0, 7.9.0, 7.8.0, 7.7.6, 7.7.5, 7.7.4, 7.7.3, 7.7.2, 7.7.1, 7.7.0, 7.6.3, 7.6.2, 7.6.1, 7.6.0, 7.5.6, 7.5.5, 7.5.4, 7.5.3, 7.5.2, 7.5.1, 7.5.0, 7.4.3, 7.4.2, 7.4.1, 7.4.0, 7.3.0, 7.2.0, 7.1.2, 7.1.1, 7.1.0, 7.0.15, 7.0.14, 7.0.13, 7.0.12, 7.0.11, 7.0.10, 7.0.9, 7.0.8, 7.0.7, 7.0.6, 7.0.5, 7.0.4, 7.0.3, 7.0.2, 7.0.1, 7.0.0, 7.0.0-rc.4, 7.0.0-rc.3, 7.0.0-rc.2, 7.0.0-rc.1, 7.0.0-rc.0, 7.0.0-beta.13, 7.0.0-beta.12, 7.0.0-beta.11, 7.0.0-beta.10, 7.0.0-beta.9, 7.0.0-beta.8, 7.0.0-beta.7, 7.0.0-beta.6, 7.0.0-beta.5, 7.0.0-beta.4, 7.0.0-beta.3, 7.0.0-beta.2, 7.0.0-beta.1, 7.0.0-beta.0, 6.14.16, 6.14.15, 6.14.14, 6.14.13, 6.14.12, 6.14.11, 6.14.10, 6.14.9, 6.14.8, 6.14.7, 6.14.6, 6.14.5, 6.14.4, 6.14.3, 6.14.2, 6.14.1, 6.14.0, 6.13.7, 6.13.6, 6.13.5, 6.13.4, 6.13.3, 6.13.2, 6.13.1, 6.13.0, 6.12.1, 6.12.0, 6.12.0-next.0, 6.11.3, 6.11.2, 6.11.1, 6.11.0, 6.10.3, 6.10.2, 6.10.2-next.3, 6.10.2-next.2, 6.10.2-next.1, 6.10.2-next.0, 6.10.1, 6.10.1-next.2, 6.10.1-next.1, 6.10.1-next.0, 6.10.0, 6.10.0-next.0, 6.9.2, 6.9.1-next.0, 6.9.0, 6.9.0-next.0, 6.8.0, 6.8.0-next.2, 6.8.0-next.1, 6.8.0-next.0, 6.7.0, 6.6.0, 6.6.0-next.1, 6.6.0-next.0, 6.5.0, 6.5.0-next.0, 6.4.1, 6.4.1-next.0, 6.4.0, 6.4.0-next.0, 6.3.0, 6.3.0-next.0, 6.2.0, 6.2.0-next.1, 6.2.0-next.0, 6.1.0, 6.1.0-next.0, 6.0.1, 6.0.1-next.0, 6.0.0, 6.0.0-next.2, 6.0.0-next.1, 6.0.0-next.0, 5.10.0, 5.10.0-next.1, 5.10.0-next.0, 5.9.0-next.0, 5.8.0, 5.8.0-next.0, 5.7.1, 5.7.0, 5.6.0, 5.5.1, 5.5.0, 5.4.2, 5.4.1, 5.4.0, 5.3.0, 5.2.0, 5.1.0, 5.0.4, 5.0.3, 5.0.2, 5.0.1, 5.0.0, 4.6.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 2.5.1, 2.5.0, 2.4.1, 2.4.0, 2.3.0, 2.2.0, 2.1.18, 2.1.17, 2.1.16, 2.1.15, 2.1.14, 2.1.13, 2.1.12, 2.1.11, 2.1.10, 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4, 2.1.3, 2.1.2, 2.1.1, 2.1.0, 2.0.2, 2.0.1, 2.0.0, 2.0.0-beta.3, 2.0.0-beta.2, 2.0.0-beta.1, 2.0.0-beta.0, 2.0.0-alpha-5, 2.0.0-alpha.7, 2.0.0-alpha.6.0, 2.0.0-alpha.6, 1.5.0-alpha-4, 1.5.0-alpha-3, 1.5.0-alpha-2, 1.5.0-alpha-1, 1.5.0-alpha-0, 1.4.29, 1.4.28, 1.4.27, 1.4.26, 1.4.25, 1.4.24, 1.4.23, 1.4.22, 1.4.21, 1.4.20, 1.4.19, 1.4.18, 1.4.17, 1.4.16, 1.4.15, 1.4.14, 1.4.13, 1.4.12, 1.4.11, 1.4.10, 1.4.9, 1.4.8, 1.4.7, 1.4.6, 1.4.5, 1.4.4, 1.4.3, 1.4.2, 1.4.1, 1.4.0, 1.3.26, 1.3.25, 1.3.24, 1.3.23, 1.3.22, 1.3.21, 1.3.20, 1.3.18, 1.3.17, 1.3.16, 1.3.15, 1.3.14, 1.3.13, 1.3.12, 1.3.11, 1.3.10, 1.3.9, 1.3.8, 1.3.7, 1.3.6, 1.3.5, 1.3.4, 1.3.2, 1.3.1, 1.3.0, 1.2.8000, 1.2.32, 1.2.31, 1.2.30, 1.2.28, 1.2.27, 1.2.25, 1.2.24, 1.2.23, 1.2.22, 1.2.21, 1.2.20, 1.2.19, 1.1.71, 1.1.70, 1.1.25
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\hu211\npm-debug.log
C:\Users\hu211>npm -g install npm@4.2.0
C:\Users\hu211\AppData\Roaming\npm\npm -> C:\Users\hu211\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
C:\Users\hu211\AppData\Roaming\npm
+-- abbrev@1.0.9
+-- ansi-regex@2.1.1
+-- aproba@1.0.4
+-- asap@2.0.5
+-- config-chain@1.1.11
| `-- proto-list@1.2.4
+-- fstream@1.0.10
+-- fstream-npm@1.2.0
| `-- fstream-ignore@1.0.5
| `-- minimatch@3.0.3
| `-- brace-expansion@1.1.6
| +-- balanced-match@0.4.2
| `-- concat-map@0.0.1
+-- glob@7.1.1
| +-- fs.realpath@1.0.0
| +-- minimatch@3.0.3
| | `-- brace-expansion@1.1.6
| | +-- balanced-match@0.4.2
| | `-- concat-map@0.0.1
| `-- path-is-absolute@1.0.1
+-- graceful-fs@4.1.11
+-- has-unicode@2.0.1
+-- inflight@1.0.6
+-- inherits@2.0.3
+-- JSONStream@1.3.0
| +-- jsonparse@1.2.0
| `-- through@2.3.8
+-- lockfile@1.0.3
+-- lodash.clonedeep@4.5.0
+-- lodash.union@4.6.0
+-- lodash.uniq@4.5.0
+-- lodash.without@4.4.0
+-- minimatch@3.0.3
| `-- brace-expansion@1.1.6
| +-- balanced-match@0.4.2
| `-- concat-map@0.0.1
+-- mississippi@1.3.0
| +-- concat-stream@1.6.0
| | `-- typedarray@0.0.6
| +-- duplexify@3.5.0
| | +-- end-of-stream@1.0.0
| | | `-- once@1.3.3
| | `-- stream-shift@1.0.0
| +-- end-of-stream@1.1.0
| | `-- once@1.3.3
| +-- flush-write-stream@1.0.2
| +-- from2@2.3.0
| +-- parallel-transform@1.1.0
| | `-- cyclist@0.2.2
| +-- pump@1.0.2
| +-- pumpify@1.3.5
| +-- stream-each@1.2.0
| | `-- stream-shift@1.0.0
| `-- through2@2.0.3
| `-- xtend@4.0.1
+-- node-gyp@3.5.0
| +-- minimatch@3.0.3
| | `-- brace-expansion@1.1.6
| | +-- balanced-match@0.4.2
| | `-- concat-map@0.0.1
| `-- nopt@3.0.6
+-- nopt@4.0.1
| `-- osenv@0.1.4
| +-- os-homedir@1.0.2
| `-- os-tmpdir@1.0.2
+-- npm@4.2.0
| +-- ansicolors@0.3.2
| +-- ansistyles@0.1.3
| +-- archy@1.0.0
| +-- chownr@1.0.1
| +-- cmd-shim@2.0.2
| +-- columnify@1.5.4
| | `-- wcwidth@1.0.0
| | `-- defaults@1.0.3
| | `-- clone@1.0.2
| +-- debuglog@1.0.1
| +-- dezalgo@1.0.3
| +-- editor@1.0.0
| +-- fs-vacuum@1.2.9
| +-- fs-write-stream-atomic@1.0.8
| +-- hosted-git-info@2.1.5
| +-- iferr@0.1.5
| +-- imurmurhash@0.1.4
| +-- ini@1.3.4
| +-- init-package-json@1.9.4
| | +-- glob@6.0.4
| | | +-- minimatch@3.0.3
| | | | `-- brace-expansion@1.1.6
| | | | +-- balanced-match@0.4.2
| | | | `-- concat-map@0.0.1
| | | `-- path-is-absolute@1.0.0
| | `-- promzard@0.3.0
| +-- lodash._baseindexof@3.1.0
| +-- lodash._baseuniq@4.6.0
| | +-- lodash._createset@4.0.3
| | `-- lodash._root@3.0.1
| +-- lodash._bindcallback@3.0.1
| +-- lodash._cacheindexof@3.0.2
| +-- lodash._createcache@3.1.2
| +-- lodash._getnative@3.9.1
| +-- lodash.restparam@3.6.1
| +-- mkdirp@0.5.1
| | `-- minimist@0.0.8
| +-- normalize-git-url@3.0.2
| +-- normalize-package-data@2.3.5
| | `-- is-builtin-module@1.0.0
| | `-- builtin-modules@1.1.1
| +-- npm-cache-filename@1.0.2
| +-- npm-install-checks@3.0.0
| +-- read@1.0.7
| | `-- mute-stream@0.0.5
| +-- read-cmd-shim@1.0.1
| +-- read-installed@4.0.3
| | `-- util-extend@1.0.3
| +-- read-package-json@2.0.4
| | +-- glob@6.0.4
| | | `-- path-is-absolute@1.0.0
| | `-- json-parse-helpfulerror@1.0.3
| | `-- jju@1.3.0
| +-- readdir-scoped-modules@1.0.2
| +-- realize-package-specifier@3.0.3
| +-- sha@2.0.1
| +-- slide@1.1.6
| +-- strip-ansi@3.0.1
| +-- tar@2.2.1
| | `-- block-stream@0.0.8
| +-- text-table@0.2.0
| +-- uid-number@0.0.6
| +-- umask@1.1.0
| +-- unique-filename@1.1.0
| | `-- unique-slug@2.0.0
| +-- unpipe@1.0.0
| +-- validate-npm-package-license@3.0.1
| | +-- spdx-correct@1.0.2
| | | `-- spdx-license-ids@1.2.0
| | `-- spdx-expression-parse@1.0.2
| | +-- spdx-exceptions@1.0.4
| | `-- spdx-license-ids@1.2.0
| `-- validate-npm-package-name@2.2.2
| `-- builtins@0.0.7
+-- npm-package-arg@4.2.0
+-- npm-registry-client@7.4.5
| `-- concat-stream@1.5.2
| +-- readable-stream@2.0.6
| | +-- core-util-is@1.0.2
| | +-- isarray@1.0.0
| | +-- process-nextick-args@1.0.7
| | +-- string_decoder@0.10.31
| | `-- util-deprecate@1.0.2
| `-- typedarray@0.0.6
+-- npm-user-validate@0.1.5
+-- npmlog@4.0.2
| +-- are-we-there-yet@1.1.2
| | `-- delegates@1.0.0
| +-- console-control-strings@1.1.0
| +-- gauge@2.7.2
| | +-- object-assign@4.1.0
| | +-- signal-exit@3.0.2
| | +-- string-width@1.0.2
| | | +-- code-point-at@1.1.0
| | | `-- is-fullwidth-code-point@1.0.0
| | | `-- number-is-nan@1.0.1
| | +-- supports-color@0.2.0
| | `-- wide-align@1.1.0
| `-- set-blocking@2.0.0
+-- once@1.4.0
+-- opener@1.4.2
+-- osenv@0.1.4
| +-- os-homedir@1.0.2
| `-- os-tmpdir@1.0.2
+-- path-is-inside@1.0.2
+-- read-package-tree@5.1.5
+-- readable-stream@2.2.2
| +-- buffer-shims@1.0.0
| +-- core-util-is@1.0.2
| +-- isarray@1.0.0
| +-- process-nextick-args@1.0.7
| +-- string_decoder@0.10.31
| `-- util-deprecate@1.0.2
+-- request@2.79.0
| +-- aws-sign2@0.6.0
| +-- aws4@1.5.0
| +-- caseless@0.11.0
| +-- combined-stream@1.0.5
| | `-- delayed-stream@1.0.0
| +-- extend@3.0.0
| +-- forever-agent@0.6.1
| +-- form-data@2.1.2
| | `-- asynckit@0.4.0
| +-- har-validator@2.0.6
| | +-- chalk@1.1.3
| | | +-- ansi-styles@2.2.1
| | | +-- escape-string-regexp@1.0.5
| | | +-- has-ansi@2.0.0
| | | `-- supports-color@2.0.0
| | +-- commander@2.9.0
| | | `-- graceful-readlink@1.0.1
| | +-- is-my-json-valid@2.15.0
| | | +-- generate-function@2.0.0
| | | +-- generate-object-property@1.2.0
| | | | `-- is-property@1.0.2
| | | +-- jsonpointer@4.0.0
| | | `-- xtend@4.0.1
| | `-- pinkie-promise@2.0.1
| | `-- pinkie@2.0.4
| +-- hawk@3.1.3
| | +-- boom@2.10.1
| | +-- cryptiles@2.0.5
| | +-- hoek@2.16.3
| | `-- sntp@1.0.9
| +-- http-signature@1.1.1
| | +-- assert-plus@0.2.0
| | +-- jsprim@1.3.1
| | | +-- extsprintf@1.0.2
| | | +-- json-schema@0.2.3
| | | `-- verror@1.3.6
| | `-- sshpk@1.10.1
| | +-- asn1@0.2.3
| | +-- assert-plus@1.0.0
| | +-- bcrypt-pbkdf@1.0.0
| | +-- dashdash@1.14.1
| | +-- ecc-jsbn@0.1.1
| | +-- getpass@0.1.6
| | +-- jodid25519@1.0.2
| | +-- jsbn@0.1.0
| | `-- tweetnacl@0.14.3
| +-- is-typedarray@1.0.0
| +-- isstream@0.1.2
| +-- json-stringify-safe@5.0.1
| +-- mime-types@2.1.13
| | `-- mime-db@1.25.0
| +-- oauth-sign@0.8.2
| +-- qs@6.3.0
| +-- stringstream@0.0.5
| +-- tough-cookie@2.3.2
| | `-- punycode@1.4.1
| `-- tunnel-agent@0.4.3
+-- retry@0.10.1
+-- rimraf@2.5.4
+-- semver@5.3.0
+-- sorted-object@2.0.1
+-- sorted-union-stream@2.1.3
| +-- from2@1.3.0
| | `-- readable-stream@1.1.14
| | +-- core-util-is@1.0.2
| | +-- isarray@0.0.1
| | `-- string_decoder@0.10.31
| `-- stream-iterate@1.1.1
+-- uuid@3.0.1
+-- which@1.2.12
| `-- isexe@1.1.2
+-- wrappy@1.0.2
`-- write-file-atomic@1.3.1
C:\Users\hu211>
然后删掉对应的文件夹和文件

上述方法也不行
D:\giitbook_project>gitbook uninstall 2.6.7
GitBook 2.6.7 has been uninstalled.
把node和gitbook全卸了
解决方法见
我感觉核心是npm要更新到最新版本
C:\Users\hu211>npm -g install npm@6.14.8
本文详细介绍了如何在Windows系统中安装Node.js 10.23.0,Git,以及Gitbook的安装过程,并记录了遇到的问题及其解决方案,包括版本兼容性、npm升级、gitbook初始化和版本管理等关键步骤。
https://blog.csdn.net/weixin_50920579/article/details/123179462
1469

被折叠的 条评论
为什么被折叠?



