cipher-base icon indicating copy to clipboard operation
cipher-base copied to clipboard

Stream Error

Open semwaqas opened this issue 1 year ago • 1 comments

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/cipher-base/index.js b/node_modules/cipher-base/index.js
index 6728005..fd5ada7 100644
--- a/node_modules/cipher-base/index.js
+++ b/node_modules/cipher-base/index.js
@@ -1,5 +1,5 @@
 var Buffer = require('safe-buffer').Buffer
-var Transform = require('stream').Transform
+var Transform = require('stream-browserify').Transform
 var StringDecoder = require('string_decoder').StringDecoder
 var inherits = require('inherits')
 

This issue body was partially generated by patch-package.

semwaqas avatar Jun 09 '24 00:06 semwaqas

Here's a pnpm patch to place into your patches folder, too!

[email protected]:

diff --git a/.npmignore b/.npmignore
deleted file mode 100644
index 3c3629e647f5ddf82548912e337bea9826b434af..0000000000000000000000000000000000000000
diff --git a/index.js b/index.js
index 6728005e957d3399d9b43e73da72c164140e2b48..fd5ada76393dc3dc248429c347245a936819ca17 100644
--- a/index.js
+++ b/index.js
@@ -1,5 +1,5 @@
 var Buffer = require('safe-buffer').Buffer
-var Transform = require('stream').Transform
+var Transform = require('stream-browserify').Transform
 var StringDecoder = require('string_decoder').StringDecoder
 var inherits = require('inherits')

shirakaba avatar Aug 06 '24 08:08 shirakaba

Duplicate of #17.

ljharb avatar Nov 16 '24 06:11 ljharb