Skip to content

Error: react-dom/server is not supported in React Server Components; when using @react-email/render in route.ts #882

@mofax

Description

@mofax

I am trying to generate HTML for an email using render() from the React Email library within an app/api/send/route.ts handler.

I am seeing this.

Error: react-dom/server is not supported in React Server Components.

Which is hard to debug since this is a route and not a component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions