Sveltekit streaming?

Streaming, snapshots, and other new features since SvelteKit 1.0
Exciting improvements in the latest version of SvelteKit
16 Replies
Vero
Vero2y ago
Hi, I’m passing this internally to see if Pages support it Yes, @rviteri , Pages support streaming😄
Ricardo Viteri
Ricardo ViteriOP2y ago
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)
Wayne
Wayne2y ago
I had issues with streaming, but resolved it by specifying node version 16.19.
Ricardo Viteri
Ricardo ViteriOP2y ago
@waynemorgan did you set the NODE_VERSION environment variable to 16.19?
Wayne
Wayne2y ago
yes
Ricardo Viteri
Ricardo ViteriOP2y ago
I have mine as 16 I am not sure if adding the specific version would make a difference
Wayne
Wayne2y ago
it has to be greater than 16.14
Ricardo Viteri
Ricardo ViteriOP2y ago
okay let me try it and I'll report back
Wayne
Wayne2y ago
I had this message on a fresh install
Your Node version is incompatible with "/@sveltejs/kit/[email protected][email protected]".

Expected version: ^16.14 || >=18
Your Node version is incompatible with "/@sveltejs/kit/[email protected][email protected]".

Expected version: ^16.14 || >=18
Ricardo Viteri
Ricardo ViteriOP2y ago
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
Wayne
Wayne2y ago
what node version are you using in local dev if i use node 16.1.0 in local dev I get the following error :
failed to load config from C:\Github\SVELTE_TEST\vite.config.js
error when starting dev server:
Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:stream/web
failed to load config from C:\Github\SVELTE_TEST\vite.config.js
error when starting dev server:
Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:stream/web
did you redeploy after changing node version?
Vero
Vero2y ago
if you need Node 18+ you can register for the beta that supports that in #Build Image Beta Testing @waynemorgan @rviteri
Ricardo Viteri
Ricardo ViteriOP2y ago
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.
Vero
Vero2y ago
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 tab
Ricardo Viteri
Ricardo ViteriOP2y ago
Great! 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)"
Wayne
Wayne2y ago
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
Want results from more Discord servers?
Add your server