vithalreddy/node-mailin

How to use in Node 18?

DanielF93Dev opened this issue · 1 comments

Hi, this library is awesome, and it works properly on node 16, but once I try using node 18, it does not work, giving the following error:

52|incomingMailHandler | error: dcde47b4-d132-450a-ba99-c761a52d19b2 Unable to finish processing message!! 52|incomingMailHandler | { 52|incomingMailHandler | message: 'Cannot set property errored of #<Readable> which has only a getter', 52|incomingMailHandler | stack: 'TypeError: Cannot set property errored of #<Readable> which has only a getter\n' + 52|incomingMailHandler | ' at new MessageSplitter (/app/node_modules/mailsplit/lib/message-splitter.js:24:22)\n' + 52|incomingMailHandler | ' at new MailParser (/app/node_modules/mailparse/lib/mail-parser.js:33:25)\n' + 52|incomingMailHandler | ' at module.exports (/app/node_modules/mailparse/lib/simple-parser.js:25:18)\n' + 52|incomingMailHandler | ' at /app/node_modules/node-mailin/lib/node-mailin.js:312:36\n' + 52|incomingMailHandler | ' at Promise._execute (/app/node_modules/bluebird/js/release/debuggability.js:384:9)\n' + 52|incomingMailHandler | ' at Promise._resolveFromExecutor (/app/node_modules/bluebird/js/release/promise.js:518:18)\n' + 52|incomingMailHandler | ' at new Promise (/app/node_modules/bluebird/js/release/promise.js:103:10)\n' + 52|incomingMailHandler | ' at parseEmail (/app/node_modules/node-mailin/lib/node-mailin.js:307:16)\n' + 52|incomingMailHandler | ' at /app/node_modules/node-mailin/lib/node-mailin.js:215:21\n' + 52|incomingMailHandler | ' at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)\n' + 52|incomingMailHandler | ' at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:547:31)\n' + 52|incomingMailHandler | ' at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)\n' + 52|incomingMailHandler | ' at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:649:10)\n' + 52|incomingMailHandler | ' at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:729:18)\n' + 52|incomingMailHandler | ' at Promise._fulfill (/app/node_modules/bluebird/js/release/promise.js:673:18)\n' + 52|incomingMailHandler | ' at Promise._resolveCallback (/app/node_modules/bluebird/js/release/promise.js:466:57)' 52|incomingMailHandler | }