Cannot use "googleapis" package in SvelteKit route on Pages
In SvelteKitwith cloudflare pages, the recommended way to add functions is to use the normal sveltekit
+server.ts route. This seems to work fine when i don't import any node modules, but I want to update a google spreadsheet from within a function. The issue is that when I import any "googleapis" the handler doesn't even run. I have the node_js compat flag set
The handler gets hit (according to the wrangler logs) but immediately responds with this 500 error without running the function.
The SvelteKit /api/addEmailToSheet/+server.ts file
Note that just importing the handler causes it to fail.1 Reply
I could get other functions working like a basic GET and POST handler if they did not import certain libraries. So i think that importing certain libraries causes some weird build output that causes the endpoints to fail