docpad/docpad

Cannot read property 'pause' of undefined

AndreWin opened this issue · 4 comments

Hello!
I used this instruction to install npm and docpad on linux mint cinnamon 18.2
I couldn't install docpad because of error Cannot read property 'pause' of undefined.

npm install -g docpad@6.79
npm WARN deprecated connect@2.30.2: connect 2.x series is deprecated

> typechecker@2.0.8 preinstall /home/andrewin/.nvm/versions/node/v8.4.0/lib/node_modules/docpad/node_modules/bal-util/node_modules/extract-opts/node_modules/typechecker
> node ./cyclic.js

npm ERR! Cannot read property 'pause' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/andrewin/.npm/_logs/2017-09-09T17_51_51_890Z-debug.log

log.zip

3978 verbose cwd /home/andrewin
3979 verbose Linux 4.8.0-53-generic
3980 verbose argv "/home/andrewin/.nvm/versions/node/v8.4.0/bin/node" "/home/andrewin/.nvm/versions/node/v8.4.0/bin/npm" "install" "-g" "docpad@6.79"
3981 verbose node v8.4.0
3982 verbose npm  v5.4.1
3983 error Cannot read property 'pause' of undefined
3984 verbose exit [ 1, true ]

What should I do to fix this?

Best regards,
Andrey.

I have this same problem when installing on Windows 10.

Andy

Just a heads up, I had this issue yesterday (node 8.5 and npm 5.4.2), but today I don't have this issue. So seems to be resolved at the dependency that was throwing issues.

Give it a whirl. :)

Edit: Strangely, if you install it once, it'll fail, install a second time, and it'll pass. Possibly an npm issue?

I can't get this to work either (I have no idea how it worked at least twice for me, haven't been able to install since).

Adding verbose logs from latest npm in Ubuntu 17.04 - node 6:

4785 silly lifecycle typechecker@2.0.8~preinstall: Args: [ '-c', 'node ./cyclic.js' ]
4786 silly lifecycle typechecker@2.0.8~preinstall: Returned: code: 0  signal: null
4787 verbose stack TypeError: Cannot read property 'pause' of undefined
4787 verbose stack     at runCmd (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:212:11)
4787 verbose stack     at dequeue (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:201:12)
4787 verbose stack     at _combinedTickCallback (internal/process/next_tick.js:73:7)
4787 verbose stack     at process._tickCallback (internal/process/next_tick.js:104:9)
4788 verbose cwd /home/angel/Proyectos/Software/docpad
4789 verbose Linux 4.12.0-14.1-liquorix-amd64
4790 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "-d" "install"
4791 verbose node v6.11.3
4792 verbose npm  v5.4.2
4793 error Cannot read property 'pause' of undefined
4794 verbose exit [ 1, true ]
angel@PADDING:~/Proyectos/Software/docpad$ npm -v
5.4.2
angel@PADDING:~/Proyectos/Software/docpad$ node -v
v6.11.3

Maybe the problem is inside npm.
Also, in my case I can reproduce this problem if I remove node_modules folder each time.

EDIT: 20171011-14:00CEST I've tried with canary version of npm (npmc), removed node_modules, and now I have no errors.

npm notice CANARY npmc is experimental software. If you find an issue, please file it in the main npm repository, and call out that you were using npmc.

> typechecker@2.0.8 preinstall /home/angel/Proyectos/Software/docpad/node_modules/bal-util/node_modules/extract-opts/node_modules/typechecker
> node ./cyclic.js

> taskgroup@4.2.1 preinstall /home/angel/Proyectos/Software/docpad/node_modules/joe/node_modules/taskgroup
> node ./cyclic.js

> ambi@2.2.0 preinstall /home/angel/Proyectos/Software/docpad/node_modules/joe/node_modules/ambi
> node ./cyclic.js

> typechecker@2.0.8 preinstall /home/angel/Proyectos/Software/docpad/node_modules/joe/node_modules/typechecker
> node ./cyclic.js

> typechecker@2.0.8 preinstall /home/angel/Proyectos/Software/docpad/node_modules/extendr/node_modules/typechecker
> node ./cyclic.js

> ambi@2.2.0 preinstall /home/angel/Proyectos/Software/docpad/node_modules/event-emitter-grouped/node_modules/ambi
> node ./cyclic.js

> typechecker@2.0.8 preinstall /home/angel/Proyectos/Software/docpad/node_modules/event-emitter-grouped/node_modules/typechecker
> node ./cyclic.js

added 297 packages in 7.502s

Same solution was given on earlier release of npm 5.x: npm/npm#16812
So, npm bug confirmed?

This should no longer be present in v6.80 as it no longer uses any of these old dependency versions.