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

Why Resend need React to work in Express?? #353

Open
AlejandroMora15 opened this issue May 9, 2024 · 3 comments
Open

Why Resend need React to work in Express?? #353

AlejandroMora15 opened this issue May 9, 2024 · 3 comments

Comments

@AlejandroMora15
Copy link

AlejandroMora15 commented May 9, 2024

I am develop an API in express with Typescript, and I am using Resend to send emails. I followed the instructions of the official doc page: https://resend.com/docs/send-with-express.

In local works perfectly. However, when I try to deploy in prod creating the build, I get this error:

node_modules/resend/dist/index.d.ts(1,24): error TS7016: Could not find a declaration file for module 'react'. '/opt/render/project/src/node_modules/react/index.js' implicitly has an 'any' type.

I cannot find any solution. Why Resend need React to work in express?

@AlejandroMora15 AlejandroMora15 changed the title Resend in express install React?? Resend need React to work in Express?? May 9, 2024
@AlejandroMora15 AlejandroMora15 changed the title Resend need React to work in Express?? Why Resend need React to work in Express?? May 9, 2024
@SirBenedick
Copy link

@AlejandroMora15 you don't need react to send an email with resend on an express server.

Did you use react components in the email body?

I did not need to install react for using the example
const { data, error } = await resend.emails.send({ from: "Acme <onboarding@resend.dev>", to: ["delivered@resend.dev"], subject: "hello world", html: "<strong>it works!</strong>", });

@AlejandroMora15
Copy link
Author

The problem is when I install Resend in my express BE, it also install React!

@shidoxo
Copy link

shidoxo commented Aug 3, 2024

Same issue working with Fastify

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

3 participants