nodejs / readable-stream

Node-core streams for userland
https://nodejs.org/api/stream.html
Other
1.03k stars 227 forks source link

fix _stream_writeable to not call functions on undefined properties #314

Closed gwmccull closed 7 years ago

gwmccull commented 7 years ago

This fixes #313

mcollina commented 7 years ago

Can you update the build scripts (https://github.com/nodejs/readable-stream/tree/master/build) as we pull the code from node core releases?

gwmccull commented 7 years ago

Hi @mcollina,

I'd be happy to make changes but I'm not sure which build scripts you're asking about.

Can you point me towards the one that needs to be updated? Or, is one of them failing that I could run and see the output?

Thanks,

Garrett

mcollina commented 7 years ago

Here it is: https://github.com/nodejs/readable-stream/blob/d6c391d7101946c8b8b97914fc46fd3322c450d1/build/files.js#L147-L149

gwmccull commented 7 years ago

I found out that you can polyfill process.version by creating a globals file and specifying the missing process properties there. That's probably the best way to go rather than try to "fix" all of the Node libraries

I'm going to close this PR for now. Feel free to re-open if you think it's really necessary.

quocson1 commented 6 years ago

image how to fix