공부
gitbook-cli 설치 시 TypeError: cb.apply is not a function 에러 해결
때려쳐아니때려치지마
2024. 12. 12. 00:02
1. Install시 에러 발생
npm install -g gitbook-cli
gitbook serve
DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Installing GitBook 3.2.3
C:\Users\myname\AppData\Roaming\npm\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 C:\Users\myname\AppData\Roaming\npm\node_modules\gitbook-cli\node_modules\npm\node_modules\graceful-fs\polyfills.js:287:18
TypeError: cb.apply is not a function 에러가 발생 함
2. gitbook 버전 확인
npm install -g gitbook-cli@2.1.2 --global
호환성 이슈가 있기 때문에 gitbook-cli을 특정 버전으로 다운받아서 해결
graceful-fs : v4.2.11
node : v16.20.2
참고자료