denoland/deno · error

SvelteKit detected, but no adapter that `deno desktop` can b

Error message

SvelteKit detected, but no adapter that `deno desktop` can bundle is configured.
{auto_hint}Configure a supported adapter in your svelte.config:
  - `@sveltejs/adapter-node` (runs under Deno via Node.js compatibility)
  - `@deno/svelte-adapter` (for Deno Deploy)

What it means

`deno desktop` found SvelteKit in the project but the adapter configured in svelte.config.js is not one it can bundle a local server from. adapter-auto (the `npx sv create` default) emits no local server output unless a cloud platform is detected, and adapter-vercel/adapter-cloudflare target cloud runtimes, so there is no server bundle for Deno to package.

Source

Thrown at cli/tools/framework.rs:615

      entrypoint_code:
        "// @ts-nocheck\nimport \"./.output/server/index.mjs\";\n".into(),
      include_paths: vec![".output".into()],
      build_command: Some(deno_task_build()),
      hmr_command: Some(deno_task_dev()),
    });
  }
  // SvelteKit is present but the configured adapter isn't one we can locate a
  // bundleable server output for (e.g. `adapter-auto`, `adapter-vercel`,
  // `adapter-cloudflare`). `adapter-auto` is the `npx sv create` default and
  // produces *no* local server output unless a known cloud platform is
  // detected at build time, so point the user at a concrete adapter.
  let auto_hint = if config_text.contains("adapter-auto") {
    "`@sveltejs/adapter-auto` produces no local server output, so there is \
     nothing to bundle. "
  } else {
    ""
  };
  bail!(
    "SvelteKit detected, but no adapter that `deno desktop` can bundle is \
     configured.\n{auto_hint}Configure a supported adapter in your \
     svelte.config:\n  - `@sveltejs/adapter-node` (runs under Deno via \
     Node.js compatibility)\n  - `@deno/svelte-adapter` (for Deno Deploy)"
  );
}

/// Existing asset directories under a `svelte-adapter-deno` `build/` output
/// that need to be embedded so the adapter's static file server can find them.
fn sveltekit_build_includes(dir: &Path) -> Vec<String> {
  ["client", "static", "prerendered"]
    .iter()
    .map(|sub| format!("build/{sub}"))
    .filter(|rel| dir.join(rel).is_dir())
    .collect()
}

/// Nuxt, SolidStart, TanStack Start all use Nitro with the `deno_server`

View on GitHub (pinned to 9ad36f7a2c)

Solutions

  1. Install and configure `@sveltejs/adapter-node` (npm i -D @sveltejs/adapter-node) so the build emits a runnable Node-compatible server that Deno can bundle
  2. Alternatively use `@deno/svelte-adapter` if you target Deno Deploy
  3. Re-run the SvelteKit build (`npm run build`) and then `deno desktop`

Example fix

// before — svelte.config.js
import adapter from '@sveltejs/adapter-auto';
export default { kit: { adapter: adapter() } };

// after
import adapter from '@sveltejs/adapter-node';
export default { kit: { adapter: adapter() } };
Defensive patterns

Strategy: validation

Validate before calling

# fail fast in setup scripts when the adapter is not bundlable:
grep -qE "adapter-(node|deno)" svelte.config.js \
  || { echo 'configure @sveltejs/adapter-node or @deno/svelte-adapter first'; exit 1; }

Try / catch

Script around `deno desktop`: on the 'no adapter that `deno desktop` can bundle' message, print install instructions (npm i -D @sveltejs/adapter-node) and abort setup cleanly.

Prevention

When it happens

Trigger: Running `deno desktop` in a SvelteKit project whose svelte.config.js imports `@sveltejs/adapter-auto`, `adapter-vercel`, `adapter-cloudflare`, or an unrecognized adapter; the config text is inspected and no supported adapter is found.

Common situations: Freshly scaffolded SvelteKit apps (sv create defaults to adapter-auto); teams that deploy to Vercel/Cloudflare trying to produce a local desktop bundle from the same config.

Related errors


AI-assisted analysis of denoland/deno@9ad36f7a2c (2026-08-20). Data as JSON: /api/errors/7c9b89f0a63b856c. Report an issue: GitHub.