Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

361
Views
nodemailer enviar correo electrónico, módulo no encontrado: no se puede resolver 'fs' y 'dns'

tengo una pregunta sobre nodemailer. Estoy tratando de enviar un correo electrónico a un usuario.

Mi código:

 var nodemailer = require('nodemailer'); var transporter = nodemailer.createTransport({ service: 'gmail', auth: { user: 'vh.yuval@gmail.com', pass: '(Pw here)' } }); var mailOptions = { from: 'vh,yuval@gmail.com', to: 'bhaliv@bbcag.ch', subject: 'Sending Email using Node.js', text: 'That was easy!' }; transporter.sendMail(mailOptions, function(error, info){ if (error) { console.log(error); } else { console.log('Email sent: ' + info.response); } });

Eso está en mi paquete.json "nodemailer": "^6.7.5",

Este código dispara el error:

 ./node_modules/nodemailer/lib/mailer/index.js:14:0 Module not found: Can't resolve 'fs' (also 'dns') Import trace for requested module: ./node_modules/nodemailer/lib/nodemailer.js ./pages/objects.js https://nextjs.org/docs/messages/module-not-found
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!