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

TypeError when running email dev with symlinked directories for aggregated emails

Open abdokouta opened this issue 10 months ago • 1 comments

Describe the Bug

Description: An error occurs when running the React email development server (email dev) if the email source files are aggregated from different sources via symlinks. The issue arises with react email UI, it's unable to render a symlinked file as nextjs need actual file to serve

Error Message:

TypeError: l is not a function at b (node_modules/react-email/dist/preview/.next/server/app/preview/[...slug]/page.js:6:330) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async y (node_modules/react-email/dist/preview/.next/server/app/preview/[...slug]/page.js:8:217) When running the React email development server (email dev), an error occurs if the email source files are aggregated from different sources via symlinks. The issue arises when running React email UI throwing this error, the error goes when I copied the file (physical file) not symlinked file

Which package is affected (leave empty if unsure)

No response

Link to the code that reproduces this issue

https://github.com/maginium/module-framework

To Reproduce

Steps to Reproduce: 1. Aggregate email files from multiple sources using symlinks. 2. Run email dev in your React email project.

Expected Behavior

When running email dev it should render the email

What's your node version? (if relevant)

v20.13.1

abdokouta avatar Jan 13 '25 21:01 abdokouta

any updates?

abdokouta avatar Jan 20 '25 23:01 abdokouta

The error doesn't seem to be the same on the latest version, but we still error when trying to render a symlinked email template

Image

gabrielmfern avatar Jul 10 '25 19:07 gabrielmfern