Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keeps asking for text.pug #348

Closed
johnnykoo84 opened this issue Feb 11, 2019 · 2 comments
Closed

keeps asking for text.pug #348

johnnykoo84 opened this issue Feb 11, 2019 · 2 comments

Comments

@johnnykoo84
Copy link

johnnykoo84 commented Feb 11, 2019

Hello Thanks for the awesome template library, we love it.
currently I'm u sing v5.0.3

Recently, I get the following error with the DEBUG_MODE env

 email-templates template curriculum_pre +17s
  email-templates message { to: 'johnnykoo@mydomain.com',
  email-templates   from: 'communication@mydomain.com',
  email-templates   attachments: [] } +0ms
  email-templates locals (keys only): [ 'pretty' ] +0ms
  email-templates templateExists { Error: ENOENT: no such file or directory, stat '/Users/kooslab/project/codestates/dev/server-codestates/emails/curriculum_pre/text.pug'

please forget about my specific path, and the problem is, it says no such file or directory. As far as I know text.pug is optional, but I already have html.pug with subject.pug

Could you please advise which configuration I should work on?
Thanks,

@niftylettuce
Copy link
Collaborator

This can be closed, it is strictly for debug output only.

Look at the source code here, you will see it is wrapped with a try/catch:

https://github.com/niftylettuce/email-templates/blob/master/src/index.js#L135-L147

@kirschem
Copy link

I had a similar problem. I had subject.pug and html.pug, however it kept failing on missing text.pug.
It turned out, that I was referencing a css inside html.pug and that css was missing.
After adding the css file, it worked as expected without having a text.pug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants