Description
This is a follow-up to #4243, which unfortunately has not been resolved yet and I thought I'd surface a new issue to bring attention to this since it was mentioned in today's blog post.
In that issue, a new API pipeToWebWritable
was added to use Cloudflare's TransformStream
implementation, but unfortunately doesn't seem to be compatible with their implementation. Unfortunately that same commit seemed to remove the older method of passing a ponyfilled ReadableStream
into renderToWebStream
too, so there's no real way to do this right now without another workaround.
As a side note, the docs still suggest that passing a third option to renderToWebStream
is still possible, even though this was removed.
Version
3.2.1
Reproduction link
#4243
https://github.com/Cherry/workers-vue-ssr-example
Steps to reproduce
- Setup Cloudflare Wrangler environment. See https://developers.cloudflare.com/workers/cli-wrangler/install-update and https://developers.cloudflare.com/workers/cli-wrangler/authentication
- Note you will need an account with the new ESM syntax enabled. See https://developers.cloudflare.com/workers/learning/using-durable-objects
npm ci
wrangler dev
- Hit
http://127.0.0.1:8787/
- Throws
Error: Failed to get the 'ready' property on 'Writer': the property is not implemented.
What is expected?
This API should work as expected and not throw an error. I'd propose that the older beta-7
functionality be restored in renderToWebStream
(with passing in a ponyfilled ReadableStream
) so this can at least be hacked around for now, or the functionality in pipeToWebWritable
tested/extended to support Cloudflare Workers more directly.
What is actually happening?
API throws Error: Failed to get the 'ready' property on 'Writer': the property is not implemented.
.