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

NextJS 15: Error: react-dom/server is not supported in React Server Components #437

Open
luannguyenQV opened this issue Oct 17, 2024 · 1 comment

Comments

@luannguyenQV
Copy link

luannguyenQV commented Oct 17, 2024

Issue:
This issue happen after I upgrade to nextjs lasted version (15.0.0-canary.195).
It throws this error when I create a new Resend instance:

new Resend(resendApiKey)

Error:

[project]/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/server.react-server.js [middleware] (ecmascript)
image

Version:

    "@react-email/components": "0.0.26-canary.4",
    "@react-email/render": "1.0.2-canary.0",
    "react-email": "3.0.2-canary.3",
    "resend": "^4.0.0",
    ...
    "next": "15.0.0-canary.195",
    "react": "19.0.0-rc-cd22717c-20241013",
    "react-dom": "19.0.0-rc-cd22717c-20241013",

Source code: https://github.com/CodeForStartup/turborepo-nextjs-prisma-postgres

@luannguyenQV luannguyenQV changed the title Error: react-dom/server is not supported in React Server Components NextJS 15: Error: react-dom/server is not supported in React Server Components Oct 17, 2024
@gabrielmfern
Copy link
Contributor

This might be an issue with React Email's render instead of with Resend, but I can't seem to reproduce in the way you said on a minimal project. Could you trim down the project you sent so that it's easier to run and so that I can reproduce?

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