Getting this error:
TypeError: Object #<Stream> has no method 'destroy'
'destroy' is a method exposed by the Node.js Stream module http://nodejs.org/api/stream.html#stream_stream_destroy
Which node.js version are you using?
I know, but in your code stream is an instance of events.EventEmitter, not of Stream
You are right. I forget about that.