shellscape / jsx-email

Build emails with a delightful DX
https://jsx.email
MIT License
902 stars 28 forks source link

Type 'Element' is not assignable to type 'ReactNode'. #79

Closed shahriyardx closed 7 months ago

shahriyardx commented 8 months ago

While building the next app this error occurs

$ next build
 ✓ Creating an optimized production build    
 ✓ Compiled successfully
   Linting and checking validity of types  ...Failed to compile.

./email/templates/PersonalEmail.tsx:31:7
Type error: Type 'Element' is not assignable to type 'ReactNode'.
  Property 'children' is missing in type 'Element' but required in type 'ReactPortal'.

  29 |   return (
  30 |     <Tailwind>
> 31 |       <Html>
     |       ^
  32 |         <Head>
  33 |           <meta name="color-scheme" content="light dark" />
  34 |           <meta name="supported-color-schemes" content="light dark" />
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Expected Behavior

Should build properly as it was building with react-email

Actual Behavior

Error

Additional Information

None

shellscape commented 8 months ago

Hey please give the instructions in the issue template another read. We require reproductions so we can help get your issue solved for your scenario.

shahriyardx commented 8 months ago

Hey please give the instructions in the issue template another read. We require reproductions so we can help get your issue solved for your scenario.

This is the repo https://github.com/shahriyardx/shahriyardx

shellscape commented 8 months ago

That's just your entire app :)

  1. Provide a minimal repository link (Read https://gist.github.com/Rich-Harris/88c5fc2ac6dc941b22e7996af05d70ff for instructions). Please use NPM for installing dependencies! These may take more time to triage than the other options.

Really, really want to help you. But 🙏 please do read our instructions. They really are helpful.

shellscape commented 7 months ago

@shahriyardx please give jsx-email@latest a try. we've had quite a few testers that use next without issue. in the future, please do add a valid reproduction.