webbertakken / email-worker

Lightweight tool to process emails directly from Cloudflare
MIT License
46 stars 9 forks source link

Handler does not export a fetch() function. #51

Closed gardner closed 1 month ago

gardner commented 1 month ago

I just cloned the repo and ran yarn ; yarn dev and am getting this error when the browser opens.

I am posting here in case anyone else runs into this. It is an upstream known issue: https://github.com/cloudflare/workers-sdk/issues/5726

Please share your experience there.

image
webbertakken commented 1 month ago

Thank you for your comment. Always appreciate people trying to link related issues.

In this case it isn't an issue in this repo. We do indeed not expose a fetch function in our code because it's an email worker example.

If you wanted a fronted you'd have to implement the fetch function as the error (in this case correctly) suggests.

gardner commented 1 month ago

Thanks for the quick response. I don't yet understand how this repo works or the dev setup for it. I just assumed it was also an issue in this repo because it happened when running yarn dev.

Now I am starting to see that it isn't relevant. If that's the case then please close this as it won't be helpful to many people.

Thank you!

Also: great setup! I love that this repo has unit tests. It's a great foundation to start a new project from.