Skip to content

[TypeError: Object #<PNGStream> has no method 'destroy'] #232

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

Closed
kilianc opened this issue Nov 29, 2012 · 7 comments
Closed

[TypeError: Object #<PNGStream> has no method 'destroy'] #232

kilianc opened this issue Nov 29, 2012 · 7 comments
Labels

Comments

@kilianc
Copy link

kilianc commented Nov 29, 2012

Stream interface not fully implemented.

@tj
Copy link
Contributor

tj commented Nov 29, 2012

99% sure Stream's prototype has no destroy

@tj
Copy link
Contributor

tj commented Nov 29, 2012

nope

@tj tj closed this as completed Nov 29, 2012
@tj
Copy link
Contributor

tj commented Nov 29, 2012

wtf.. ok the node docs mention it just fine, this is part of why streams are garbage, just assuming every stream-like thing happens to implement the correct interface

@tj tj reopened this Nov 29, 2012
@mitar
Copy link
Contributor

mitar commented Sep 20, 2014

There is also no pause.

@mitar
Copy link
Contributor

mitar commented Sep 20, 2014

OK. A simple workaround:

var through = require('through');
var wellBehavedStream = canvasElement.pngStream().pipe(through());

So you just pipe it through through() and it will make it work.

@zbjornson
Copy link
Collaborator

From the docs and discussion on SO it seems like streams don't actually provide a .destroy method, although fs.readStream happens to.

See more notes in #740.

@zbjornson
Copy link
Collaborator

Fixed in 8b5dc05 I think. (Definitely fixed, but not positive it was that commit.)

> canvas.createPNGStream().destroy
[Function: destroy]

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

No branches or pull requests

4 participants