Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

event.getClientAddress() make the server to throw status 500 in Sveltekit deployed on Vercel

$
0
0

Im still new to Svelte. I tried to deploy my basic project to vercel to play around.

I have a +page.server.js file that has event.getClientAddress() to get the ip address. When I look through the log for event.getClientAddress(), I do get the client's IP but it still throw error 500. The log also shows that I am trying to read 'read properties of undefined'.

On my local machine, I am using import { dev } from '$app/environment'; to set the IP for testing purposes during development. But on vercel logs, event.getClientAddress() in +page.server.js do give the correct IP address


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>