..
CDCloudflare Developers
•Created by .. on 7/30/2024 in #pages-help
TypeError: Inter-TransformStream ReadableStream.pipeTo() is not implemented
I am trying to do something similar to this (1) to stream responses from my Pages functions API. This works well in my local development environment, but fails when deployed to Cloudflare with the above error in error log.
Curiously, looking at Workers ReadableStream methods docs (2), it looks like the
pipeTo
method is implemented. Is Pages perhaps using older or different version of Workers before this method was implemented? I suspect this because I found this post (3) that links to this (4) that describes the similar problem.
Is that right? If so, how soon should we expect Pages functions to support the missing method? If not, what am I doing wrong and how do I fix it?
(1) https://github.com/craigsdennis/vanilla-chat-workers-ai/blob/b422dfae3d89c49c40c6e9ad32d259f9390d77fa/src/index.tsx#L145-L147
(2) https://developers.cloudflare.com/workers/runtime-apis/streams/readablestream/#methods
(3) https://www.answeroverflow.com/m/1181702193573789817
(4) https://community.cloudflare.com/t/running-into-unimplemented-functionality/773432 replies