Sveltekit streaming?
Does Pages support streaming?
https://svelte.dev/blog/streaming-snapshots-sveltekit
Streaming, snapshots, and other new features since SvelteKit 1.0
Exciting improvements in the latest version of SvelteKit
16 Replies
Hi, I’m passing this internally to see if Pages support it
Yes, @rviteri , Pages support streaming😄
Hi @veerooo are there any specifics I should take into account? On the Svelte Discord another user said they've had issues with Cloudflare. I am currently on the free plan.
Hi, I just wanted to report that I tested this and it works fine on nodejs when in dev but does not work after the build is deployed to Pages (I am using the cloudflare sveltekit adapter)
I had issues with streaming, but resolved it by specifying node version 16.19.
@waynemorgan did you set the NODE_VERSION environment variable to 16.19?
yes
I have mine as 16
I am not sure if adding the specific version would make a difference
it has to be greater than 16.14
okay let me try it and I'll report back
I had this message on a fresh install
It still doesn't work for me, there must be something else with my code that breaks using pages as it works fine with my dev environment
what node version are you using in local dev
if i use node 16.1.0 in local dev I get the following error :
did you redeploy after changing node version?
if you need Node 18+ you can register for the beta that supports that in #Build Image Beta Testing @waynemorgan @rviteri
Yes, I did
@veerooo is there a way to view pages logs? I've always wondered how to do this. I know that workers has a debug option to see the incoming requests live but I can't find the same for Pages.
Yesss,
wrangler pages deployments tail <deployment id>
Or in the dashboard, you can click on the specific deployment from your project, and go to the Functions tabGreat! I just found it!
Error: To use the new ReadableStream() constructor, enable the streams_enable_constructors feature
that seems to be the error
"Error: To use the new ReadableStream() constructor, enable the streams_enable_constructors feature flag.\n at render_response (bundledWorker-0.3160733881048463.mjs:37792:5)\n at async render_page (bundledWorker-0.3160733881048463.mjs:38337:12)\n at async resolve2 (bundledWorker-0.3160733881048463.mjs:38885:22)\n at async respond (bundledWorker-0.3160733881048463.mjs:38781:22)\n at async Object.fetch (bundledWorker-0.3160733881048463.mjs:39190:13)"
I found that cloning an app and building/deploying to a new page resolved an issue I had with streaming. I am not sure if its a cache problem when redeploying