When trying to send an email, the server crashes with this error:
err checkout TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at new NodeError (node:internal/errors:329:5) at validateString (node:internal/validators:129:11) at Object.join (node:path:1081:7) at TemplateGenerator.render (/Users/myname/Desktop/Code/myapp/server/node_modules/nodemailer-express-handlebars/lib/generator.js:19:29) at /Users/myname/Desktop/Code/myapp/server/node_modules/nodemailer-express-handlebars/lib/index.js:9:19
The route is working, the transporter is defined (I can log it in the terminal with the correct informations), the express-handlebars context is defined (I can also log the variable username), I can also log the process.env parts.
When trying to send an email, the server crashes with this error:
err checkout TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at new NodeError (node:internal/errors:329:5) at validateString (node:internal/validators:129:11) at Object.join (node:path:1081:7) at TemplateGenerator.render (/Users/myname/Desktop/Code/myapp/server/node_modules/nodemailer-express-handlebars/lib/generator.js:19:29) at /Users/myname/Desktop/Code/myapp/server/node_modules/nodemailer-express-handlebars/lib/index.js:9:19
The code is:
The route is working, the transporter is defined (I can log it in the terminal with the correct informations), the express-handlebars context is defined (I can also log the variable username), I can also log the process.env parts.
The structure is:
So there is no directory error here.
Where is this undefined path argument?