react-email icon indicating copy to clipboard operation
react-email copied to clipboard

All builds failing with react-email templates on Next.js 14 with error "Cannot get final name for export 'encodeXML'"

Open WoetDev opened this issue 8 months ago • 9 comments

Describe the Bug

I'm having a blocking issue for all my builds with Next.js 14.2.3:

Cannot get final name for export 'encodeXML' of ./react-email/node_modules/.pnpm/[email protected]/node_modules/entities/lib/esm/index.js

It seems that this is already a long-standing issue that has been closed without proper resolution: https://github.com/resend/react-email/issues/1015

The mentioned workarounds do also not work for me:

  1. Tried to use the render function to first render the react component to HTML and send the email
  2. Tried to add the following to my next.config.js:
experimental: {
    serverComponentsExternalPackages: ["@react-email/components"],
  },

Not using the Edge runtime on my page

  1. Tried setting my page as a client component with "use client" at the top

Used packages:

"@react-email/components": "^0.0.19", "react-email": "^2.1.4",

Which package is affected (leave empty if unsure)

No response

Link to the code that reproduces this issue

private

To Reproduce

Create a next 14 project and use the following packages:

"@react-email/components": "0.0.19",
"react-email": "2.1.4",

Expected Behavior

Build succeeds

What's your node version? (if relevant)

v20.13.1

WoetDev avatar Jun 09 '24 18:06 WoetDev