使用gitbook发布文章生成网站(一)
目錄
1.先安裝node.js
?2.安裝Git
3.gitbook安裝
報錯解決
已經解決
問題1?
問題2
?其他問題
?
注意node.js 版本要和gitbook版本對應
1.先安裝node.js
Download | Node.jshttps://nodejs.org/en/download/
?點擊
?
?找到10.23.0
一定要先看以下鏈接不然會報錯
用vscode配置gitbook(一)改_啥也不是的py人的博客-CSDN博客_gitbook vscode以往的版本 | Node.js下載10.23.0具體操作看我上一篇gitbook的blog這里附上版本信息C:\Users\hu211>node -vv10.23.0C:\Users\hu211>npm -v4.2.0更新一下npm版本C:\Users\hu211>npm -g install npm@6.14.8C:\Users\hu211>npm -v6.14.8接下來下載gitbookC:\Users\hu21.https://blog.csdn.net/weixin_50920579/article/details/123179462
?下載這個
?.msi代表可以直接安裝的版本
找到它
然后安裝
?然后調出cmd看看是否安裝成功
輸入node -v
然后回車
此時為安裝成功
?2.安裝Git
Githttp://git-scm.com/點擊下載
?點擊下載
?安裝程序注意勾選
?
點擊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版本安裝成功
先隨便找個地方創(chuàng)建一個文件夾
?然后在地址欄輸入cmd然后回車
然后在cmd里輸入
gitbook init
?
?出現(xiàn)這些就是成功了
summary是用來產生目錄的
readme.md拖入subline出現(xiàn)的就是這個
然后
接著剛剛在目錄里打開的cmd里輸入
gitbook serve
報錯解決
已經解決
問題1?
在文件夾中cmd時出現(xiàn)?
?‘gitbook‘ 不是內部或外部命令,也不是可運行的程序 或批處理文件
但是win+R cmd卻可以調出gitbook
我是直接重啟解決的
問題2
?
gitbook init的時候出現(xiàn)問題
直接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.是版本的問題
安裝穩(wěn)定版本5.7.0
?然后安裝即可(參考以下解答)
nodejs 錯誤問題解決_di84186的博客-CSDN博客
又出現(xiàn)加載問題
?Gitbook使用時出現(xiàn)Error loading version latest_vincentuva的博客-CSDN博客
參照以上的解決方法
給gitbook降低版本
C:\Users\hu211>npm uninstall -g gitbookC:\Users\hu211>npm install -g gitbook-cli@2.3.0NPM 報錯--fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module - gogo0 - 博客園
參照以上解決方法更新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.0npm 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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.2.2, 3.2.1, 3.2.0, 3.1.3, 3.1.2, 3.1.1, 3.1.0, 3.0.0, 2.15.12, 2.15.11, 2.15.10, 2.15.9, 2.15.8, 2.15.7, 2.15.6, 2.15.5, 2.15.4, 2.15.3, 2.15.2, 2.15.1, 2.15.0, 2.14.22, 2.14.21, 2.14.20, 2.14.19, 2.14.18, 2.14.17, 2.14.16, 2.14.15, 2.14.14, 2.14.13, 2.14.12, 2.14.11, 2.14.10, 2.14.9, 2.14.8, 2.14.7, 2.14.6, 2.14.5, 2.14.4, 2.14.3, 2.14.2, 2.14.1, 2.14.0, 2.13.5, 2.13.4, 2.13.3, 2.13.2, 2.13.1, 2.13.0, 2.12.1, 2.12.0, 2.11.3, 2.11.2, 2.11.1, 2.11.0, 2.10.1, 2.10.0, 2.9.1, 2.9.0, 2.8.4, 2.8.3, 2.8.2, 2.8.1, 2.8.0, 2.7.6, 2.7.5, 2.7.4, 2.7.3, 2.7.2, 2.7.1, 2.7.0, 2.6.1, 2.6.0, 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.logC:\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.1C:\Users\hu211>然后刪掉對應的文件夾和文件
?上述方法也不行
D:\giitbook_project>gitbook uninstall 2.6.7 GitBook 2.6.7 has been uninstalled.把node和gitbook全卸了
解決方法見
用vscode配置gitbook(一)改_啥也不是的py人的博客-CSDN博客以往的版本 | Node.js下載10.23.0具體操作看我上一篇gitbook的blog這里附上版本信息C:\Users\hu211>node -vv10.23.0C:\Users\hu211>npm -v4.2.0更新一下npm版本C:\Users\hu211>npm -g install npm@6.14.8C:\Users\hu211>npm -v6.14.8接下來下載gitbookC:\Users\hu21.https://blog.csdn.net/weixin_50920579/article/details/123179462?spm=1001.2014.3001.5502
我感覺核心是npm要更新到最新版本
C:\Users\hu211>npm -g install npm@6.14.8總結
以上是生活随笔為你收集整理的使用gitbook发布文章生成网站(一)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【Appium踩坑】关闭inspecto
- 下一篇: 实时音频编解码之十六 Opus解码