Uncaught Error: No such module "cloudflare-internal:email".

I get this error when trying to create an EmailMessage as per the documentation https://developers.cloudflare.com/email-routing/email-workers/send-email-workers/#example-worker I'm using @cloudflare/workers-types/2023-07-01 and haven't been able to find any examples apart from the docs above.
Send emails from Workers · Cloudflare Email Routing docs
You can send an email about your Worker’s activity from your Worker to an email address verified on Email Routing. This is useful for when you want to …
4 Replies
jonasb
jonasb7mo ago
Ah, it works when deployed, but now when running locally
Chaika
Chaika7mo ago
Even using npx wrangler dev --remote? Fully local simulation (the default for dev on 3.x) probably doesn't support it, remote dev might.
jonasb
jonasb7mo ago
Ah, that worked. I've never tried --remote before
jonasb
jonasb7mo ago
GitHub
🚀 Feature Request: Support/don't crash when using send_mail in mi...
Describe the solution When adding import { EmailMessage } from 'cloudflare:email'; to index.ts (following the docs) I get the following error when running wrangler dev: [wrangler:inf] Ready...