Hey I am trying to run a simple Svelte-kit project on appwrite self-hosted but the logs says:
[13:56:26] [open-runtimes] Build packaging finished.
[13:56:26] [open-runtimes] Build finished.
[13:56:30] [appwrite] Deployment finished.
But than when I go to the url it says literally 404 page not found
Does anyone know what I am doing wrong? -# The sveltekit project is located in the ./frontend/web of my private gh repo
The issue is almost certainly the adapter mismatch you have Server side rendering selected, which requires @sveltejs/adapter-node, but if your svelte.config.js is still using adapter-static or any other adapter, Appwrite won't know how to serve the app correctly, hence the 404. Can you share what adapter is currently set in your svelte.config.js?
svelte.config.js
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),
kit: {
adapter: adapter(),
alias: { $components: 'src/components' },
},
runes: true,
vitePlugin: {
dynamicCompileOptions: ({ filename }) =>
filename.includes('node_modules') ? undefined : { runes: true },
},
};
export default config;
Your adapter config looks correct, so the issue is likely that Appwrite's SSR runtime expects the server entry point at a specific path and adapter-node outputs it differently by default. You need to set the output option in your adapter config to match what Appwrite expects.
Try updating your adapter like this:
adapter({ out: 'build' })
Also make sure your output directory in the Appwrite settings matches that it's currently set to ./build which should be right. I've actually worked through a few Appwrite + SvelteKit deployment issues before. Shoot me a DM if you want me to help you get this fully sorted quickly!
Recommended threads
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...
- > AppwriteException: The requested servi...
When trying to read or write from my database I get the following error: > AppwriteException: The requested service is disabled. You can enable the service from...
- Appwrite 1.9.0 doctor fails tho database...
So i was testing in a local environment the upgrade for 1.9.0, and after getting everything into a running state, i checked the logs that shows : ``` └── Cre...