GitbookIO / gitbook-cli

GitBook's command line interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: cb.apply is not a function

TT-usr opened this issue · comments

➜  the-swift-programming-language-in-chinese git:(gh-pages) gitbook build
Installing GitBook 3.2.3
(node:12870) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
/opt/homebrew/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js:287
      if (cb) cb.apply(this, arguments)
                 ^

TypeError: cb.apply is not a function
    at /opt/homebrew/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqCallback.oncomplete (node:fs:199:5)

node version is v16.8.0

Stackoverflow thread regarding this: https://stackoverflow.com/questions/64211386/gitbook-cli-install-error-typeerror-cb-apply-is-not-a-function-inside-graceful

Seems to simply migrate the issue, though. gitbook no longer prints errors, but the commands don't do anything...

I am facing the same error how did you guys resolve the error

This problem still exists.
Any workaround or solutions instead of usin NodeJS <=12.18.2?