Skip to content

'Unexpected closing tag "td". Help! #1838

@jimapl

Description

@jimapl

Describe the Bug

After bumping react and nextjs to latest, I get this error on all my email renders:

import {render} from "@react-email/render";
...
export const customVerificationRequest = async ({token, identifier: email} : {
    token: string;
    identifier: string;
}) => {
    try {

        const html = await render(<MagicSigninEmail token={token}/>, {
            pretty: true,
        });
       ...

    } catch (e) {
        console.error({e})
    }
}

Which throws

[cause]: t {
  span: [h],
  msg: 'Unexpected closing tag "td". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags',
  level: 1,
  elementName: 'td'
}
    "@react-email/components": "^0.0.28",
    "@react-email/render": "^1.0.3",
     "react-email": "3.0.4",

Which package is affected (leave empty if unsure)

No response

Link to the code that reproduces this issue

Private repo

To Reproduce

Switching to stable branch everything works. Meaning react 18 / nextjs 14.
Have not changed any code, both render and renderAsync this happens.

Expected Behavior

Email to be rendered

What's your node version? (if relevant)

v20.10.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions