The Docker runtime image only ships dist/, but mail-config.service.ts pointed at src/mail/mail-templates and nest-cli.json never copied the .hbs files into dist/ either. This was silently masked before because the return-before-sendMail bug meant the path was never touched; fixing that bug now surfaces it as a hard crash on boot (readFileSync throwing synchronously inside the MailerModule factory). Resolve the templates dir from __dirname instead, which is correct in both dev (src/mail) and the compiled image (dist/mail), and add the mail-templates .hbs files to nest-cli.json's asset copy list so they actually land in dist/.
229 B
229 B