Open jmikrut opened 1 year ago
Didn't I fix this in https://github.com/nodeca/probe-image-size/commit/a6da059439614c399b79c09ea1d406a3e4300b27? Maybe you're using old version (which may happen because of some other dependency).
Or the error might've reappeared elsewhere. In this case, please provide full example that we can run as is.
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?