solidjs / solid-start

SolidStart, the Solid app framework
https://start.solidjs.com
MIT License
5.2k stars 375 forks source link

[Bug]: renderStream not working as expected in prod mode #1138

Closed r0skar closed 11 months ago

r0skar commented 11 months ago

Duplicates

Latest version

Current behavior 😯

When starting an app with renderStream the streaming is not working in prod mode. The page waits until the server has done its job before completing the request. It works fine in dev mode.

Expected behavior 🤔

It should work in prod and dev mode.

Context 🔦

I looked through a couple of things and noticed this old PR (https://github.com/solidjs/solid-start/pull/167). For whatever reason the headers in prod look like this : accept: 'image/avif,image/webp,*/*', and therefor the compression kicks in and prevents the streaming. If I disable the compression the issue is fixed and everything works perfect. I have patched the package and thats fine for my use case at the moment.

Your environment 🌎

OS: Linux
Binary: Node 20.0.9
OS: Linux
solid-js: "1.8.5",
solid-start: "0.3.10",
lgrammel commented 11 months ago

FYI I've observed that streaming does not work when using the solidstart-openai example from the Vercel AI SDK with pnpm build && pnm start (pnpm dev works fine): https://github.com/vercel/ai/tree/main/examples/solidstart-openai

ryansolid commented 11 months ago

In setting up for SolidStart's next Beta Phase built on Nitro and Vinxi we are closing all PRs/Issues that will not be merged due to the system changing. If you feel your issue was closed by mistake. Feel free to re-open it after updating/testing against 0.4.x release. Thank you for your patience.

See https://github.com/solidjs/solid-start/pull/1139 for more details.