Mysql, nodemailer not working in lambda

I am trying to consult RDS through the mysql connector and the results send them by email, but when installing the first dependency ‘mysql’ the query is generated in a wrong way but the mailings are not made; the strange thing about this is that if I install Nodemailer first the emails are sent, but the queries are not generated, could someone help me?