I got an error when using nodemailer on localhost, causing an internal server error (500): ERROR: SELF_SIGNED_CERT_IN_CHAIN
I found this thread on the issue: Npm SELF_SIGNED_CERT_IN_CHAIN on Azure, suggesting to do:
npm config set ca ""
but didn't help. also upgrading the npm didn't help:
npm update -g