Closed zburgermeiszter closed 4 months ago
No plans to start supporting cloudflare workers.
No worries.
I figured out the polyfills and bundling, but it looks like as long as the net
module is not allowed on CF Workers, this won't be possible.
Cloudflare workers have an alternative for the net module, so the code can be ported to work with Cloudflare, but it’s too much work.
Describe the bug
imapflow
is incompatible with Cloudflare Email Workers.To Reproduce
Generate a new worker
npm create cloudflare@2.5.0 -- cloudflare-email-push-to-imap
index.ts
const client = new ImapFlow({ host: env.IMAP_HOST, port: env.IMAP_PORT, secure: true, auth: { user: env.IMAP_USER, pass: env.IMAP_PASS, }, });
export default {};
:schema node_modules/wrangler/config-schema.json
name = "cloudflare-email-push-to-imap" main = "src/index.ts" compatibility_date = "2024-04-23"
compatibility_flags = ["nodejs_compat"]
node_compat = true