Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue upgrading to react-email 2.0.0 #3

Open
jared-backpocket opened this issue Feb 2, 2024 · 3 comments
Open

issue upgrading to react-email 2.0.0 #3

jared-backpocket opened this issue Feb 2, 2024 · 3 comments

Comments

@jared-backpocket
Copy link

Hi,

First time poster so sorry in advance if I am missing any details.

When I pull down this repo and setup it up for the first time following the instructions inside the README.md file, everything works as expected.

However, when I bump the version of react-email to 2.0.0, and follow the steps from the changelog

  • move static directory inside of ./emails so the path is ./emails/static
  • re-run pnpm install
  • then run pnpm dev

The preview app loads, but there are no emails displayed in the LHS bar anymore:
Screenshot 2024-02-02 at 10 54 23 pm

And when I manually go to this route http://localhost:3001/preview/vercel-invite-user I get this error:
Screenshot 2024-02-02 at 11 03 31 pm

Would someone be able to provide any information on what could be causing this error or is there a migration guide on how to transition from 1.10.0 to 2.0.0 within a project that is using nextjs, react-email, turborepo and pnpm?

Thanks for taking the time to read over this issue.

@gabrielmfern
Copy link
Collaborator

Hey @jared-backpocket sorry for taking a bit to answer this.

This is happening because the changes to 2.0 need the user to have all the dependencies for the email to actually be built into HTML. So, you would also need React itself installed for things to work properly. If you used npx create-email@latest for this I'd recommend you use npx create-email@canary that already comes with what you need installed as well as with React Email 2.0.

@gabrielmfern
Copy link
Collaborator

Also, the emails not appearing on the sidebar seems to me like the same issue that resend/react-email#1204 fixes. If you want the fix you can also upgrade react-email to canary like pnpm add react-email@canary -E

@gabrielmfern
Copy link
Collaborator

So, you would also need React itself installed for things to work properly. If you used npx create-email@latest for this I'd recommend you use npx create-email@canary that already comes with what you need installed as well as with React Email 2.0.

If you'd like to know the dependencies, you can look here to see the template for create-email@canary:

https://github.com/resend/react-email/blob/addea4d276bcc0b3236542a28715a38886cb3fa2/packages/create-email/template/package.json#L10-L18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants