# Solution for error using latest react email and error renderToReadableStream

**URL:** https://forum.codewithmosh.com/t/solution-for-error-using-latest-react-email-and-error-rendertoreadablestream/23962
**Category:** Next.js
**Created:** [December 3, 2023, 3:13pm UTC](https://forum.codewithmosh.com/t/solution-for-error-using-latest-react-email-and-error-rendertoreadablestream/23962 "2023-12-03T15:13:46Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![onlyhasbi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/onlyhasbi/32/4608_2.png) [@onlyhasbi](https://forum.codewithmosh.com/u/onlyhasbi)
#### Post date: [December 3, 2023, 3:13pm UTC](https://forum.codewithmosh.com/t/solution-for-error-using-latest-react-email-and-error-rendertoreadablestream/23962/1 "2023-12-03T15:13:46Z")

</div>

if you facing an Error to import classnames, etc. , you need to

> upgrade node.js version to lts version 18.19.0

for Error `Attempted import error: 'renderToReadableStream' is not exported from 'react-dom/server' (imported as 'renderToReadableStream').`

you need to install extra packages below from @react-email

```auto
npm i @react-email/render

```

hope it helps

---

<div class="post-metadata">

### Author: ![gabfer](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@gabfer](https://forum.codewithmosh.com/u/gabfer)
#### Post date: [December 5, 2023, 8:01pm UTC](https://forum.codewithmosh.com/t/solution-for-error-using-latest-react-email-and-error-rendertoreadablestream/23962/2 "2023-12-05T20:01:32Z")

</div>

I tried with the  
npm i @react-email/render  
but i even got more errors.

After changing the package.json to  
“@react-email/components”: “0.0.12”,  
“react-email”: “1.10.0”,

and installed then it worked fine.  
Maybe you have to delete the old folder in node\_modules

---

<div class="post-metadata">

### Author: ![onlyhasbi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/onlyhasbi/32/4608_2.png) [@onlyhasbi](https://forum.codewithmosh.com/u/onlyhasbi)
#### Post date: [December 5, 2023, 9:16pm UTC](https://forum.codewithmosh.com/t/solution-for-error-using-latest-react-email-and-error-rendertoreadablestream/23962/3 "2023-12-05T21:16:38Z")

</div>

> [@gabfer](#):
>
> “@react-email/components”: “0.0.12”,  
> “react-email”: “1.10.0”,

this is the latest react email, i mention in the title this thread

---

<div class="post-metadata">

### Author: ![jerommiole](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jerommiole](https://forum.codewithmosh.com/u/jerommiole)
#### Post date: [December 18, 2023, 10:43am UTC](https://forum.codewithmosh.com/t/solution-for-error-using-latest-react-email-and-error-rendertoreadablestream/23962/4 "2023-12-18T10:43:20Z")

</div>

Thank you!!! This one helps 🙂

---

<div class="post-metadata">

### Author: ![DavidS](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/davids/32/7600_2.png) [@DavidS](https://forum.codewithmosh.com/u/DavidS)
#### Post date: [January 12, 2024, 12:23pm UTC](https://forum.codewithmosh.com/t/solution-for-error-using-latest-react-email-and-error-rendertoreadablestream/23962/5 "2024-01-12T12:23:01Z")

</div>

I was unsuccessful with the suggestions above in my environment. However, the automatic install did work correctly the first time (In it’s own directory structure.).

---

<div class="post-metadata">

### Author: ![DavidS](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/davids/32/7600_2.png) [@DavidS](https://forum.codewithmosh.com/u/DavidS)
#### Post date: [February 6, 2024, 11:23pm UTC](https://forum.codewithmosh.com/t/solution-for-error-using-latest-react-email-and-error-rendertoreadablestream/23962/6 "2024-02-06T23:23:05Z")

</div>

I resolved the problem by placing the email request in an ‘api’ using Next’s ‘route.js’. Putting the outbound request in a server object gave me a working model to build from. I’m not sure how it would work in the suggested configuration but CORS was another factor I found needed to be contended with and the server side request skirted the problem. I also backed off the version of Next to 13.5.6. I was looking at comments out of this series: [renderToReadableStream not found in react-dom/server · Issue #868 · resend/react-email · GitHub](https://github.com/resend/react-email/issues/868).
