Hello I've gotten a issue with sveltekit when I initiate the client I get a error: TypeError: Cannot read properties of undefined (reading 'replace') at Client.setEndpoint. This only happens at build/start and not in dev mode I've seen someone else with the same issue but he is using NextJS but the exact same error he gets aswell only problem is that its closed and there are not fixes: https://github.com/appwrite/appwrite/issues/5328
TL;DR
I am experiencing an error with Appwrite's setEndpoint function in Sveltekit. The error message states "TypeError: Cannot read properties of undefined (reading 'replace') at Client.setEndpoint." This error only occurs during build/start and not in development mode. I found a GitHub thread discussing the same issue, but unfortunately, it is closed with no fixes mentioned.Error Appwrite setEndpoint
Fixed: Dynamic ENV was empty for some reason at build. Use Static ENV
SOLVED: Error Appwrite setEndpoint
Recommended threads