-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Cannot find module 'cloudflare:email' #441
Comments
I don't think this is meant to be supported in dev, but maybe @alexanderniebuhr has a better idea of this. |
Yeah we don't have support for this in |
Yeah I don't think Cloudflare provides local support for that. I wonder if it's worth providing a better error message when a cloudflare builtin is encountered, if not maybe we can close this. |
As you can see in this table, |
Aha, thanks for the link! Does that mean I can expect |
So I am seeing this very same problem in Cloudflare in a branch build (not the main/production branch). I haven't tested on prod. But its the Cloudflare env. I can't even finish the build on Cloudflare. How do I fix that? |
I should clarify that I am doing this under |
Ok, I figured it out. Go into "astro.config.mjs". Then add the following entry for Vite...
Obviously this can be done alongside other rules. I have my build settings alongside my resolve rules. But this solved it for me. |
@pthurmond-vmlyr Thanks for the update. Given the following code in the latest release, you shouldn't need to do the manual entry. Can you try again and post a repository for us to look into? |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I'm trying to
import { EmailMessage } from 'cloudflare:email'
in an Astro page.Normally this kinda import would be used in Workers just fine, but Astro seems unable to do the magic...
When I request the page, I get the following stack trace:
I'm using the following
astro.config.js
:What's the expected result?
I would like for the page to render without error.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-6doees
Participation
The text was updated successfully, but these errors were encountered: