SvelteKit Guide

Looking for guidance on deploying a SvelteKit app:

Tried the normal node instructions, but keep getting errors:

“Failed due to unhealthy allocations”

If you run fly logs after a failed SvelteKit deploy, you might be able to see why it isn’t working. “Unhealthy Allocations” either means the process crashed or health checks failed.

From that repository, I’m guessing it can’t figure out the start command. How do you actually run a SvelteKit app? If you add a start script in package.json that runs what you want, it might work.

You need to add a start to the package.json with the following command node build/index.js. But do remember you will need some other steps before this to run the build command. I’m using a Dockerfile to action those steps first.

"scripts": {
    "dev": "svelte-kit dev",
    "build": "svelte-kit build",
    "preview": "svelte-kit preview",
    "start": "node build/index.js"

and did you solve this?

I would be very interested to have such guide !