You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to be coming from this package. Here is the full error with node --trace-warnings:
(node:74217) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [PassThrough]. Use emitter.setMaxListeners() to increase limit
at _addListener (node:events:587:17)
at PassThrough.addListener (node:events:605:10)
at PassThrough.Readable.on (node:internal/streams/readable:887:35)
at eos (node:internal/streams/end-of-stream:196:10)
at pipe (node:internal/streams/pipeline:392:10)
at pipelineImpl (node:internal/streams/pipeline:323:25)
at pipeline (node:internal/streams/pipeline:151:10)
at probeStream (/MY-PROJECT-PATH/node_modules/probe-image-size/stream.js:63:8)
at Object.get_image_size [as default] (/MY-PROJECT-PATH/node_modules/probe-image-size/index.js:13:12)
I've adjusted the code to not use a createReadStream and instead read the full file to memory first as follows:
Issue goes away. Is this indeed caused by something within probe-image-size? It appears so on my end but can't figure out how to resolve / diagnose further.
One other thing I should note is that we did try to destroy and close the readStream after having used it. For example:
constreadStream=fs.createReadStream(filePath);constresult=awaitprobeImageSize(readStream);readStream.destroy()// also tried `close()`
But this does not fix the warning either.
Any ideas?
The text was updated successfully, but these errors were encountered:
Hi there and thank you for this package!
I am seeing a
MaxListenersExceededWarning
while usingcreateReadStream
andprobe-image-size
like follows:It seems to be coming from this package. Here is the full error with
node --trace-warnings
:I've adjusted the code to not use a
createReadStream
and instead read the full file to memory first as follows:Issue goes away. Is this indeed caused by something within
probe-image-size
? It appears so on my end but can't figure out how to resolve / diagnose further.One other thing I should note is that we did try to
destroy
andclose
thereadStream
after having used it. For example:But this does not fix the warning either.
Any ideas?
The text was updated successfully, but these errors were encountered: