1
I have the following folder and file structure in my Node project:
And the following configuration of email templates:
configureTemplates() {
const viewPath = resolve(__dirname, '..', 'app', 'views', 'emails');
this.transporter.use('compile', nodemailerhbs({
viewEngine: exphbs.create({
layoutsDir: resolve(viewPath, 'layouts'),
partialsDir: resolve(viewPath, 'partials'),
defaultLayout: 'default',
extName: '.hbs',
}),
viewPath,
extName: '.hbs',
}));
}
When I run the method, the following error is displayed to me:
What is wrong ?