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

Headers is not defined #343

Open
inuoluwadunsimi opened this issue Mar 29, 2024 · 0 comments
Open

Headers is not defined #343

inuoluwadunsimi opened this issue Mar 29, 2024 · 0 comments

Comments

@inuoluwadunsimi
Copy link

I get a headers is not defined error each time I try to use resend in my nodejs app

I have been using this as a workaround for a while, can a more permanent solution be done please?
import fetch, { Headers, Response, Request } from "node-fetch";

if (!global.fetch) {
global.fetch = fetch as unknown as typeof global.fetch;
global.Headers = Headers as unknown as typeof global.Headers;
global.Response = Response as unknown as typeof global.Response;
global.Request = Request as unknown as typeof global.Request;
}

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

1 participant