
Hey guys, I'm trying out SvelteKit with Appwrite and using @sveltejs/adapter-static. I'm getting a error of 'window is not defined' when I run 'npm run dev'.
I have added export const prerender = true; in +layout.js in the root of routes folder.
Not sure what is wrong. Would like for some assistance or guidance on this.
Thanks in advance!

What exactly is throwing this?

Are you using realtime functionality? That might be problematic with static adapter and pre-renders.

Ahh sorry for the late reply. Didn't get notified.
Anyways, I fixed the problem. I imported in some extra Appwrite functions which I wasn't using and it was causing some issues.
Haven't tried realtime yet but will keep in mind if I come across this again. Thanks!

[SOLVED] Window is not defined when running in SvelteKit using Adapter Static
Recommended threads
- Unraid Deployment
Does anyone know how to point a production iOS app to an Appwrite Docker image I have on my Unraid server? I need a lot of storage, and having Appwrite on my Un...
- not getting cookie in header of appwrite...
my website working locally and on vercel , but when hosting on appwrite sites the main core issue is its not getting the cookie . <@743532656767270934> help
- custom domain failing
I have an appwrite app at a subdomain myapp.topdomain.com. I want to configure the appwrite endpoint to use a 2nd level subdomain e.g. api.myapp.topdomain.com. ...
