Also another question is there a reason cloudflare doesn't use node?
Also another question is there a reason cloudflare doesn't use node?

wrangler pages dev --persist --r2=PIC -- npm run dev) everything seems to work with no errors, however when I deploy the app using cf pages UI of the app works with no errors but any attempt to trigger functions result in errors. On the client (i.e. in the console tab of the devtools section of the browser) I see internal server error 500, on the backend wrangler pages deployment tail I see Error: network connection lost. Initially I built the app using astro/vanillajs but then tried vite/react thinking that the error might be specific to astro, however the error persists

wrangler pages dev --persist --r2=PIC -- npm run dev to test locally the app is available on both port 5173(default for vite) and port8788(default for wrangler/workerd?). The one that is available on port 8788 works well while the one available on port 5173 results in same type of errors as the one on the prod (ie [project-name].pages.dev).then to handle the async part. I will try to replace with await but I feel that whole this error has something to do with deploy. It seems like requests I am making are not directed to functions and therefore return some weird errors
dist folderreadableStream from the uploaded File and passes it along, so you're not buffering the file contents.--experimental-local maybe your original code will stop working locallygetUsesMiddleware with a URL to decide if I need to do extra stuff with the request.wrangler pages published, the resulting deploy would never return any logs. Half the time it did. So i would connect, do some requests, and if no logs came through, I’d publish again and try again. Over about 10 deploys, it worked half the time.context.env? I'm thinking of instantiating a faunadb client in a module then importing that, but then I'd have to dependency inject the secrets from where-ever I'm calling it from and I'm not sure about that.context.env is that the practice? const bucketPut = await env.PIC.put(
uuid,
fileUploaded.stream(),
bucketPutOptions
);type UsesMiddlewareProps = {
url: string;
};
// Requests with these strings should not have middleware added to them.
export const undesiredPaths = [
".css",
".ico",
".js",
".png",
".jpeg",
".jpg",
".svg",
".wepb",
"/fonts/"
];
export function getUsesMiddleware({url} : UsesMiddlewareProps): boolean {
return ! undesiredPaths.some((undesiredString) => {
return url.includes(undesiredString);
});
}internal server error 500wrangler pages deployment tailError: network connection lost