You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm super excited that streaming has landed in Astro, such a great feature!
Unfortunately Cloudflare Pages are currently stuck on a fairly old version of the workers runtime that doesn't support streams. There is as of right now no way to set the compatibility date or the flag to enable streams. I've asked about this again on the Cloudflare discord but the last update was "it's coming soon", which isn't a concrete timeframe.
What this means is that the Cloudflare adaptor, for now anyway, will only work with versions of Astro pre 1.0.0-beta.55.
I've tried the web-streams polyfill and buffering the response to a string in the Cloudflare adaptor but I think the issue lies in the fact that the Response constructor doesn't know what to do when passed a stream and just outputs [object ReadableStream].
I don't think this is a bug or an issue with Astro, more Cloudflare Pages itself, but I've raised the issue here because I think it should be documented on the Cloudflare adaptor which I'm happy to raise a PR to do, since it's now somewhat broken. Or on the off chance there is a way to workaround the streams changes that went into Astro core?
Link to Minimal Reproducible Example
n/a
Participation
I am willing to submit a pull request for this issue.
The text was updated successfully, but these errors were encountered:
The webapi polyfill won't do the trick unfortunately - ReadableStream is defined in Cloudflare Page Functions but is stubbed in with a constructor that throws an error if you try to use it right now
I'm checking to see if there's anything we can use for feature detection, but it looks like we'll probably need to expose a flag to disable streaming
What version of
astro
are you using?1.0.0-beta.55
Are you using an SSR adapter? If so, which one?
Cloudflare
What package manager are you using?
pnpm
What operating system are you using?
mac
Describe the Bug
I'm super excited that streaming has landed in Astro, such a great feature!
Unfortunately Cloudflare Pages are currently stuck on a fairly old version of the workers runtime that doesn't support streams. There is as of right now no way to set the compatibility date or the flag to enable streams. I've asked about this again on the Cloudflare discord but the last update was "it's coming soon", which isn't a concrete timeframe.
What this means is that the Cloudflare adaptor, for now anyway, will only work with versions of Astro pre
1.0.0-beta.55
.I've tried the
web-streams polyfill
and buffering the response to a string in the Cloudflare adaptor but I think the issue lies in the fact that the Response constructor doesn't know what to do when passed a stream and just outputs[object ReadableStream]
.I don't think this is a bug or an issue with Astro, more Cloudflare Pages itself, but I've raised the issue here because I think it should be documented on the Cloudflare adaptor which I'm happy to raise a PR to do, since it's now somewhat broken. Or on the off chance there is a way to workaround the streams changes that went into Astro core?
Link to Minimal Reproducible Example
n/a
Participation
The text was updated successfully, but these errors were encountered: