GitbookIO / gitbook-cli

GitBook's command line interface
714 stars 212 forks source link

TypeError [ERR_INVALID_ARG_TYPE] when execute gitbook init #108

Open muzhicaoming opened 4 years ago

muzhicaoming commented 4 years ago

wangzhimengdeMacBook:books wangzhimeng$ gitbook init warn: no summary file in this book info: create README.md 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

muzhicaoming commented 4 years ago

the reason may be that it is not compatible for the newest version of the node.js

Fanlu91 commented 4 years ago

I got the same issue.

➜  gitbook 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
➜  gitbook gitbook -V
CLI version: 2.3.2
GitBook version: 3.2.3
➜  gitbook node -v
v14.3.0
vvguoliang commented 3 years ago

I got the same issue.

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

zumdar commented 3 years ago

same issue with me too

danvinhe commented 3 years ago

me too

emredc1337 commented 3 years ago

same issue lolz

zixun commented 3 years ago

me too

BH1SCW commented 3 years ago

me too, found a useful link, BTW https://xmuli.tech/posts/d7327716/

jhfnetboy commented 2 years ago

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

me too

ghost commented 2 years ago

wangzhimengdeMacBook:books wangzhimeng$ gitbook init warn: no summary file in this book info: create README.md 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

Question

@muzhicaoming, any progress made trying to fix this issue? Just curious.

Kry1702 commented 1 year ago

me too , Try to lower the node.js version, it works fine in v12.22.12 version, no error message appears.