Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'pipesCount' of undefined #113

Open
2snoopy88 opened this issue Oct 20, 2020 · 5 comments
Open

TypeError: Cannot read property 'pipesCount' of undefined #113

2snoopy88 opened this issue Oct 20, 2020 · 5 comments

Comments

@2snoopy88
Copy link

  • Node Version:v12.19.0
  • CLI Version:2.3.2
  • Gitbook Version:3.2.3
  • System:Windows 10

$ gitbook serve
Live reload server started on port: 35729
Press CTRL+C to quit ...

info: 7 plugins are installed
info: loading plugin "livereload"... OK
info: loading plugin "highlight"... OK
info: loading plugin "search"... OK
info: loading plugin "lunr"... OK
info: loading plugin "sharing"... OK
info: loading plugin "fontsettings"... OK
info: loading plugin "theme-default"... OK
info: found 1 pages
info: found 0 asset files
_stream_readable.js:638
if (state.pipesCount === 1) {
^

TypeError: Cannot read property 'pipesCount' of undefined
at ReadStream.Readable.pipe (_stream_readable.js:638:13)
at C:\Users\Asde.gitbook\versions\3.2.3\node_modules\cpr\lib\index.js:163:2 2
at callback (C:\Users\Asde\AppData\Roaming\npm\node_modules\gitbook-cli\node _modules\npm\node_modules\graceful-fs\polyfills.js:295:20)
at FSReqCallback.oncomplete (fs.js:168:21)

@Bakhtiar-Sadeghi
Copy link

please use

npm install gitbook-cli@2.1.2 --global

@ritenseki
Copy link

thank you! my problem has been solved.

@zhang-fork
Copy link

zhang-fork commented Dec 29, 2020

Systemarchlinux

I can not uninstall the gitbook CLI version: 2.3.2 with

npm uninstall gitbook-cli -g ,

and then run

npm install gitbook-cli@2.1.2 --global

nothing happened.

I sloved it by

cd ~/.gitbook/versions/3.2.3/node_modules/npm/node_modules/
vim package.json 

change the version of graceful-fs to 4.2.0,and then

npm install

after that, everything is ok.

what's more, my node version is 12.22 , if node version is 14 up, that may cause other problems.

@ghost
Copy link

ghost commented Mar 19, 2021

@zhang-fork Thank you it works 😆

@kadashu
Copy link

kadashu commented Mar 23, 2021

# MacOS 10.15.7
# npm --version
# 6.14.11
# node --version
# v14.16.0

cd /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules && \
  npm install graceful-fs@4.2.0 --save

works for me , thx @zhang-fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants