MateMalice / mail-listener2

Mail listener library for node.js. Get notification when new email arrived.
Other
9 stars 7 forks source link

TypeError: Cannot set property errored of #<Readable> which has only a getter with mail-parser dep. #35

Closed gustavos00 closed 1 year ago

gustavos00 commented 2 years ago

Hello, First of all, I don't know if this is the right place to create a issue about my problem.

Basically, when I try to use .on('mail', (email) => {}) is giving me a error with the mail-parser dependency. The error is: .../node_modules/mailparser/lib/mail-parser.js:141 this.errored = false; TypeError: Cannot set property errored of #<Readable> which has only a getter

MateMalice commented 1 year ago

Hi @gustavos00 -

EDIT: I have found that the error only occurred when using NodeJS v 18+; it did not occur in NodeJS v 16. The cause was an old version of a dependency package (mailsplit) that did not appear to be compatible with NodeJS v 18.

I have updated the relevant dependency and will be releasing a fix shortly.

Thank you for pointing this out. :-)

MateMalice commented 1 year ago

Fixed in v2.1.1.