cloudflare / cloudflare/vinext
Error: react-dom/server is not supported in React Server Components; when using @react-email/render in route.ts
Open
- Dominant language
- TypeScript
- Stars
- 8.8k
- Forks
- 406
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 120
Description
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.
Contributor guide
Research direction
Start with the reported app/api/send/route.ts handler and the render() call from @react-email/render. Reproduce the react-dom/server error in that route and trace how vinext classifies or handles the route. Done means the reported failure is resolved or produces a clear, actionable diagnostic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100