feross / stream-to-blob

Convert a Readable Stream to a Blob
MIT License
60 stars 11 forks source link

Blob is not defined #1

Closed wyqydsyq closed 7 years ago

wyqydsyq commented 7 years ago

Using this with latest Node.js gives me:

/node_modules/stream-to-blob/index.js:16
        : new Blob(chunks)
              ^
ReferenceError: Blob is not defined
    at ReadStream.<anonymous> (/home/me/cruncher/node_modules/stream-to-blob/index.js:16:15)
    at emitNone (events.js:91:20)
    at ReadStream.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
error Command failed with exit code 1.
feross commented 7 years ago

Blob is a browser DOM object and it's not available in Node.js. Maybe you want a Buffer instead?

namse commented 5 years ago

@feross Then you should remove example in README.md which use fs and remove tag node in this repository please. I spend my time because of that.

feross commented 5 years ago

Fair point.