1.11 breaks backward compatibility
JonnyBGod opened this issue · 7 comments
Describe the bug
After upgrading to 1.11 or later it faills compilation while using either 'nodemailer-mandrill-transport' or 'nodemailer-mailgun-transport'.
To Reproduce
import mandrillTransport from 'nodemailer-mandrill-transport'
const transport = mandrillTransport({
auth: {
apiKey: 'MANDRILL_KEY',
},
})
Expected behavior
It should not break compatibility with older transports that use callbacks intead of promises
Additional context
[ExceptionHandler] transporter.verify(...).then is not a function TypeError: transporter.verify(...).then is not a function
at MailerService.verifyTransporter (/node_modules/@nestjs-modules/mailer/dist/mailer.service.js:67:14)
at new MailerService (/node_modules/@nestjs-modules/mailer/dist/mailer.service.js:60:18)
at Injector.instantiateClass (/node_modules/@nestjs/core/injector/injector.js:365:19)
at callback (/node_modules/@nestjs/core/injector/injector.js:65:45)
at Injector.resolveConstructorParams (/node_modules/@nestjs/core/injector/injector.js:144:24)
at Injector.loadInstance (/node_modules/@nestjs/core/injector/injector.js:70:13)
at Injector.loadProvider (/node_modules/@nestjs/core/injector/injector.js:97:9)
at /node_modules/@nestjs/core/injector/instance-loader.js:56:13
at async Promise.all (index 4)
at InstanceLoader.createInstancesOfProviders (/node_modules/@nestjs/core/injector/instance-loader.js:55:9)
at /node_modules/@nestjs/core/injector/instance-loader.js:40:13
at async Promise.all (index 43)
at InstanceLoader.createInstances (/node_modules/@nestjs/core/injector/instance-loader.js:39:9)
at InstanceLoader.createInstancesOfDependencies (/node_modules/@nestjs/core/injector/instance-loader.js:22:13)
at /node_modules/@nestjs/core/nest-factory.js:108:17
at Function.asyncRun (/node_modules/@nestjs/core/errors/exceptions-zone.js:22:13)
Yea I can confirm this. Upon updating 1.11.2 i get the following error upon startup:
[Nest] 44016 - 29.02.2024, 21:34:11 ERROR [MailerService] Transporter is ready
I am not using any custom transport though.
I can confirm too, my application used SendMailTransport and I received the same errors.
I removed it to use simple object config and I discovered the same error message that @domme1908 referred (see comment above ↑)
Why I always receiving [MailerService] Transporter is ready
?
Me too, please tell me how to solve it?