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

HTML not working #15

Open
Gagenrllc opened this issue Dec 20, 2022 · 2 comments
Open

HTML not working #15

Gagenrllc opened this issue Dec 20, 2022 · 2 comments

Comments

@Gagenrllc
Copy link

I get a syntax error when I try to use html in my email component.

const notificationEmail = ({ title, message }) => ({ subject: ${title}, html: ( <div> <p> {message}</p> </div> ) })

throws this error.

SyntaxError: Unexpected token '<' at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:119:18) at ESMLoader.moduleProvider (node:internal/modules/esm/loader:475:14) [nodemon] app crashed - waiting for file changes before starting...

Running from a windows env

PS C:\Projects\support\appsupp\server> node -v
v16.17.1

Any ideas?

@mathieutu
Copy link
Owner

Hi.

I'm not sure to understand what is this html attribute you're referring.

The key should be body. Also, be sure to have React in your dependencies.

@Gagenrllc
Copy link
Author

Here is my package.json

image

Same error with the body prop.

image

Error

image

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

2 participants