Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

stream.on is not a function #1

Closed
whydna opened this issue Jan 14, 2018 · 7 comments
Closed

stream.on is not a function #1

whydna opened this issue Jan 14, 2018 · 7 comments
Labels

Comments

@whydna
Copy link

whydna commented Jan 14, 2018

I'm getting the following error after following the instructions in the README.

Any idea whats wrong?

dist/index.js:167 Uncaught TypeError: stream.on is not a function
    at index.js:167
    at pull.collect (files.js:227)
    at reduce.js:10
    at drain.js:20
    at map.js:19
    at next (index.js:22)
    at index.js:39
    at Array.<anonymous> (index.js:10)
    at next (index.js:26)
    at index.js:39
@0xVasconcelos
Copy link
Contributor

0xVasconcelos commented Jan 14, 2018

+1
Same here.

@0xVasconcelos
Copy link
Contributor

The problem is in ipfs.files.cat function, hlsjs-ipfs-loader expects an stream data to pipe and receives a Uint8Array that isn't directly readable.
I'll check better tomorrow.

@pgc-13
Copy link
Owner

pgc-13 commented Jan 14, 2018

Thanks for making me aware of this. Must be a change to how ipfs.files.cat works... I’ll look into this as soon as possible (or if you already have a patch for this feel free to create a pull request). Cheers

@0xVasconcelos
Copy link
Contributor

0xVasconcelos commented Jan 14, 2018

I fixed the problem, I'll send a pull request in some minutes.

@pgc-13
Copy link
Owner

pgc-13 commented Jan 14, 2018

Thanks a lot! I’ll publish a new npm version when I’m at the computer.

@pgc-13
Copy link
Owner

pgc-13 commented Jan 14, 2018

Alright, version 0.1.2 has been published and the example now runs fine (tested in Firefox as well).

https://www.npmjs.com/package/hlsjs-ipfs-loader

Closing this issue now. Thanks again @lucaslg26 for the patch!

@pgc-13 pgc-13 closed this as completed Jan 14, 2018
@whydna
Copy link
Author

whydna commented Jan 14, 2018

Wow thank you guys!

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

No branches or pull requests

3 participants