Closed ghost closed 4 years ago
It would likely be better to ask this on the express-handlebars github. This module just passes along your configuration.
Here's the cause and the solution: https://github.com/ericf/express-handlebars/issues/269#issuecomment-562529760
It's a workaround, so by my experience I suggest to leave this setup and configuration for a non-nextjs context.
Anyway, thanks @yads for your attention.
I'm experiencing problems to find the right path settings in
production
for my nodemailer/handlebars setup. The transporter is connected to an API request in order to send an automatic email.In
development
I'm leaving the configuration as is, so basically I have this situation:No problems here, everything works fine.
On
Now
instead, I'm receiving this exception:The request returns an ok response as you can see here:
So I concluded that the problem is related to the wrong path set on transporter config. I can't live it like on
dev
because it redirects on/var/tasks
. The problem is that I've tried different ways to locate the file path correctly, without success:__dirname +'<path>'
/<path>...
_next
production dir:/_next/static/....
This is my current filesystem:
As you can see, I've the config file both inside on
/static/js/mail/config
than/_next/static/js/mail/config
. None of both worked, the call responses every time with the same error, independently by its path.This is my current
now.json
if it could be helpful:Anyone experienced this before or could help me in some way?
Thanks in advance