Skip to content

Conversation

@florian-lefebvre
Copy link
Member

@florian-lefebvre florian-lefebvre commented Mar 18, 2025

Changes

Testing

Should still pass

Docs

withastro/docs#11288

@florian-lefebvre florian-lefebvre self-assigned this Mar 18, 2025
@changeset-bot
Copy link

changeset-bot bot commented Mar 18, 2025

🦋 Changeset detected

Latest commit: b0d1334

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Do we have to update cloudflare docs by any chance?

@florian-lefebvre
Copy link
Member Author

There's a docs PR removing the astro:env limitation, I don't think we need to update the adapter docs

@florian-lefebvre florian-lefebvre merged commit 9721f4a into main Mar 21, 2025
15 checks passed
@florian-lefebvre florian-lefebvre deleted the feat/cloudflare-global-env branch March 21, 2025 10:02
@astrobot-houston astrobot-houston mentioned this pull request Mar 21, 2025
@icepuma
Copy link

icepuma commented Mar 21, 2025

Looks good! Do we have to update cloudflare docs by any chance?

I had to enable https://developers.cloudflare.com/workers/configuration/compatibility-flags/#enable-auto-populating-processenv via wrangler.toml to make it work. So I think to add some hint to the documentation should be added

@ascorbic
Copy link
Contributor

@icepuma that indicates it's now on by default though, right?

@icepuma
Copy link

icepuma commented Mar 21, 2025

If you set the compatibility_date to the mentioned one, the deployment fails because it's in the future 😅

So I had to enable the flag manually (nodejs_compat_populate_process_env) without setting the compatibility_date to 2025-04-01

@florian-lefebvre
Copy link
Member Author

I thought env from cloudflare:workers was GA, we probably need to ask someone at cloudflare

@icepuma
Copy link

icepuma commented Mar 24, 2025

@ascorbic
Copy link
Contributor

@icepuma that's about process.env. As Florian says, this feature uses imports from cloudflare:workers instead, which I think is a different feature.

@icepuma
Copy link

icepuma commented Mar 24, 2025

As I mentioned before, I had to explicitly enable the mentioned flag to get my astro app running, hence why I'm mentioning it

@florian-lefebvre
Copy link
Member Author

Yeah and that helps thanks. I've asked cloudflare and I'll post updates here

@florian-lefebvre
Copy link
Member Author

It should definitely not happen. @icepuma can you open an issue with a minimal reproduction? Ideally a gh repo so we can deploy it ourselves to cloudflare

@icepuma
Copy link

icepuma commented Mar 24, 2025

https://github.com/open-source-issues/astro-cloudflare-env-problem this should do the trick. If something is missing, let me know :)

@icepuma
Copy link

icepuma commented Mar 24, 2025

And here's the issue: #13503

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"astro:env/server" stopped working with @astrojs/cloudflare and Astro 5.4.2

4 participants