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

Uncaught ReferenceError: FileReadStream is not defined #160

Closed
allthetime opened this issue Oct 23, 2014 · 3 comments
Closed

Uncaught ReferenceError: FileReadStream is not defined #160

allthetime opened this issue Oct 23, 2014 · 3 comments
Labels

Comments

@allthetime
Copy link

@allthetime allthetime commented Oct 23, 2014

I'm running your simple example as is but I keep getting

Uncaught ReferenceError: FileReadStream is not defined

Which comes from inside webtorrent.min.js. I tried with browserify as well and still get the same error.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Oct 23, 2014

This is a bug. Must have been introduced in the last few days. Looking into it now.

@clesocles

This comment has been minimized.

Copy link

@clesocles clesocles commented Oct 24, 2014

I think this was introduced when you corrected the blobToBuffer null callback issue in the seed method. I don't know if this is a proper fix, but here is how I've fixed it:

  1. Declare at top of WebTorrent's index.js:

var FileReadStream = require('filestream/read');
var stream = require('stream');

  1. enter WebTorrent directory in npm console, locally install two modules as follows:

npm install filestream
npm install stream

  1. In WebTorrent's package.json, under dependencies, include:

"filestream": "^2.1.0",
"stream": "^0.0.1",

This works with browserify.

P.S. please correct me about whether doing any of these things is redundant. I tried a lot of things.

@feross feross added the area/browser label Oct 25, 2014
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Oct 25, 2014

@clesocles - thanks for debugging this issue. fixed in 19e44f7 and published as 0.11.2.

we need to improve the browser test coverage and get it to the level of the node tests, to catch issues like this before they're published.

@feross feross closed this Oct 25, 2014
@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.