gitbook-cli icon indicating copy to clipboard operation
gitbook-cli copied to clipboard

TypeError: Cannot read property 'pipesCount' of undefined

Open 2snoopy88 opened this issue 5 years ago • 5 comments

  • 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)

2snoopy88 avatar Oct 20 '20 08:10 2snoopy88

please use

npm install [email protected] --global

Bakhtiar-Sadeghi avatar Oct 29 '20 10:10 Bakhtiar-Sadeghi

thank you! my problem has been solved.

ritenseki avatar Dec 19 '20 03:12 ritenseki

Systemarchlinux

I can not uninstall the gitbook CLI version: 2.3.2 with

npm uninstall gitbook-cli -g ,

and then run

npm install [email protected] --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.

zhang-fork avatar Dec 29 '20 08:12 zhang-fork

@zhang-fork Thank you it works 😆

ghost avatar Mar 19 '21 12:03 ghost

# 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 [email protected] --save

works for me , thx @zhang-fork

kadashu avatar Mar 23 '21 23:03 kadashu