node-libs-browser
node-libs-browser copied to clipboard
Compatibility with new readable-stream
Hi,
to use recent readable-stream, I had to patch your module:
--- a/index.js
+++ b/index.js
@@ -22,11 +22,11 @@
exports.readline = null;
exports.repl = null;
exports.stream = require.resolve('stream-browserify');
-exports._stream_duplex = require.resolve('readable-stream/duplex.js');
-exports._stream_passthrough = require.resolve('readable-stream/passthrough.js');
-exports._stream_readable = require.resolve('readable-stream/readable.js');
-exports._stream_transform = require.resolve('readable-stream/transform.js');
-exports._stream_writable = require.resolve('readable-stream/writable.js');
+exports._stream_duplex = require.resolve('readable-stream/lib/_stream_duplex.js');
+exports._stream_passthrough = require.resolve('readable-stream/lib/_stream_passthrough.js');
+exports._stream_readable = require.resolve('readable-stream/lib/_stream_readable.js');
+exports._stream_transform = require.resolve('readable-stream/lib/_stream_transform.js');
+exports._stream_writable = require.resolve('readable-stream/lib/_stream_writable.js');
exports.string_decoder = require.resolve('string_decoder');
exports.sys = require.resolve('util/util.js');
exports.timers = require.resolve('timers-browserify');
Are these changes supposed to be made to the module? If so, can I work on this?
Hi @michael-ciniawsky, this is needed with readable-stream ≥ 3
If anyone is still facing this problem, I’ve created updated version of node-libs-browser
which updates these API changes.