accimeesterlin / nodemailer-examples

Nodemailer examples
https://www.youtube.com/playlist?list=PLurIMwd6GdCiv8ZhpqcwqpFM5Ez4JGago
94 stars 127 forks source link

ERR_INVALID_ARG_TYPE "path" #12

Open marvictifora opened 3 years ago

marvictifora commented 3 years ago

after doing what instructed my email fails to send and returns this error.

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at validateString (internal/validators.js:120:11) at Object.resolve (path.js:980:7) at ExpressHandlebars._resolveLayoutPath (/home/marvic/Documents/email_schedule/node_modules/nodemailer-handlebars/node_modules/express-handlebars/lib/express-handlebars.js:342:17) at ExpressHandlebars. (/home/marvic/Documents/email_schedule/node_modules/nodemailer-handlebars/node_modules/express-handlebars/lib/express-handlebars.js:223:35) { code: 'ERR_INVALID_ARG_TYPE'

am i doing something wrong???

PManager1 commented 3 years ago

yes same fucking issue.

anirudhmalik commented 2 years ago

transporter.use('compile', hbs({ viewEngine: **{ defaultLayout: false // <----- added this },** viewPath: './views/' }));

add defaultLayout: false