
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
- Subdomain failed verification
So I wanted to do a custom subdomain, because local storage doesn't work for me, but I've tried it a long time ago, it didn't work for me, and now I'm trying ag...
- [Node.js SDK] Bypass 2GB file limit?
Hello. Using either InputFile.fromPath or InputFile.fromBuffer throws this error: File size (2295467305) is greater than 2 GiB Bucket limit etc. is setup corre...
- Relationship null, even when relationshi...
Hi Everyone, im experiencing issues with set relation data. When im setting the document id from the related database most of them seem fine, except one table. ...
