'gitbook init Error: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be
node: v14.0.0
CLI version: 2.3.2
GitBook version: 3.2.3
Windows10
When execute gitbook init
in an empty folder, it pops up:
$ gitbook init
warn: no summary file in this book
info: create SUMMARY.md
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Promise
And there is no "SUMMARY.md" created... How could it be fixed?Thanks!
Solution 1:[1]
I have the same problem just as you. Switch back from latest node version to 12.18.1 LTS.
And everything gonna be ok.
Solution 2:[2]
Do you want to convert markdown files to an e-book? If so, pandoc is an alternative.
pandoc -o js_functional.epub --metadata title="Functional JavaScript" *.md
If you want mobi format, calibre is a good converter.
Solution 3:[3]
npm install -g gitbook-summary and cd to your target directory, run "book sm" Summary will be resolved.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Choes |
Solution 3 | frank |