nodejs / readable-stream

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

2.3.8 - lib/_stream_writeable.js line 57 ... process not defined #533

Closed jschimmoeller closed 7 months ago

jschimmoeller commented 7 months ago

starting getting this error on line 57 ...

/*<replacement>*/ var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; /*</replacement>*/

when running it throws this error image

logs: Uncaught ReferenceError: process is not defined at 24558 (_stream_writable.js:57:18) at webpack_require (bootstrap:19:32) at 12053 (readable-browser.js:4:20) at webpack_require (bootstrap:19:32) at 8486 (index.js:5:14) at webpack_require (bootstrap:19:32) at 40662 (index.js:39:12) at webpack_require (bootstrap:19:32) at 8865 (utilities.js:6:16) at __webpack_require__ (bootstrap:19:32)

FYI.. my work around was in my package.json to use : "overrides": { "readable-stream": "3.6.2" }

mcollina commented 7 months ago

Update your library and dependencies. v2 is extremely old.