Running SvelteKit in Cloudflare
I am moving my SvelteKit from Vercel Edge, which from my understanding is Cloudflare, to Cloudflare directly.
However, I get this message when I run a form action:
This is caused from
getRequestEvent
in my code which needs AsyncLocalStorage
. I didn't have to configure anything fancy in Vercel Edge for this to work, but it won't work in Pages.
There is no nodejs_compat
nor the preferable nodejs_als
available.
How do I get this to work?
J
1 Reply
this seems to be the issue, which I don't know how to solve - https://community.cloudflare.com/t/compatibility-flags-nodejs-compat-and-nodejs-als-not-available/791040
Got it working by manually adding
nodejs_als
flag... it wasn't saving before, but I must have not entered it correctly!...