Can I leave adapter-auto when running SvelteKit on a VPS?

- 2/2024

What I thought: adapter-auto will know that I’m on a node environment and build with no problem (e.i. is “automatically” done for me).

Wrong.

SvelteKit will compile fine, npm run dev, npm run build and even npm run preview (which shows you the post build site) will work.

But you don’t get the /build folder.

So how can npm run preview work without a /build folder? I believe is because is because preview uses the .svelte-kit (which you should not use).

So you HAVE to use the adapter-node when running a SvelteKit app un production.