resend / react-email

💌 Build and send emails using React
https://react.email
MIT License
12.57k stars 571 forks source link

fix(react-email): Issue with `email dev` when there is a `browserslist` in the user's package.json #1401

Closed gabrielmfern closed 1 month ago

gabrielmfern commented 1 month ago

A few times since we launched the 2.0.0 version of React Email's CLI, there were a few people reporting issues that had errors like the following when running email dev:

../@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
Attempted import error: 'useLayoutEffect' is not exported from 'react' (imported as 'useLayoutEffect').

But I was never quite sure what was the culprit of this since the error was pretty cryptic.

Turns out this was a NextJS bug as I found out after someone from Discord made a reproduction of the error.

This was fixed under https://github.com/vercel/next.js/pull/61791 and released under NextJS@14.1.1-canary.44, so this PR just upgrades to the latest NextJS (i.e., 14.1.4) to fix the issue.

I have tested this on the reproduction they gave me and can confirm it indeed fixes the issue.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-email ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2024 3:57pm
react-email-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2024 3:57pm