extension-port-stream icon indicating copy to clipboard operation
extension-port-stream copied to clipboard

Getting the stream module issue

Open addyevdox opened this issue 2 years ago • 1 comments

image

addyevdox avatar Jul 21 '22 08:07 addyevdox

This library relies upon a piece of the Node standard library, stream. Hence, in a browser context, this library does not exist. However, you can still use it if you install stream-browserify. You can instruct Webpack to automatically use stream-browserify when it sees stream by adding resolve.fallback: { "stream": require.resolve("stream-browserify") } to your Webpack config. That's what the error message is telling you. Once you do this, then the issue should go away.

Let me know if you have any more questions.

mcmire avatar Jul 21 '22 16:07 mcmire

As of v3, this module no longer uses the standard library stream, but instead a portable readable-stream which should work the same across browsers and non-ancient Node.js versions.

@addyevdox Apologies for delay in following up! In case this is still relevant, using the latest version (currently v4.2.0) should hopefully work in browsers without bringing your own streams.

If there are still any compatibility issues, please open a new issue.

legobeat avatar Jul 01 '24 21:07 legobeat