You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the nextjs app only checks the root directory ./emails for templates.
I want to put it inside ./src/emails to integrate in my project. I tried ln -s src/emails emails and it failed to preview the templates with the following error:
Error: The email component at path-to-project-root/emails/welcome.tsx does not contain the expected exports
at tg (node_modules/.pnpm/react-email@4.0.3_react-dom@19.0.0_react@19.0.0__react@19.0.0_sass@1.77.4/node_modules/react-email/dist/preview/.next/server/app/preview/[...slug]/page.js:203:143393)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async v (node_modules/.pnpm/react-email@4.0.3_react-dom@19.0.0_react@19.0.0__react@19.0.0_sass@1.77.4/node_modules/react-email/dist/preview/.next/server/app/preview/[...slug]/page.js:15:72)
at async E (node_modules/.pnpm/react-email@4.0.3_react-dom@19.0.0_react@19.0.0__react@19.0.0_sass@1.77.4/node_modules/react-email/dist/preview/.next/server/app/preview/[...slug]/page.js:105:217)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It seems that the nextjs app only checks the root directory
./emails
for templates.I want to put it inside
./src/emails
to integrate in my project. I triedln -s src/emails emails
and it failed to preview the templates with the following error:The template is def correctly exported as:
Beta Was this translation helpful? Give feedback.
All reactions