On this page

SvelteKitServerExportUnavailableError

Trace execution of SER's publish-time fallback for a SvelteKit virtual server export.

What this error means and what can trigger it

SvelteKitServerExportUnavailableError means code executed SER's internal publish-time shim for $app/server instead of the virtual module implementation supplied by SvelteKit. The class records the unavailable export in export_name.

The shim contains placeholders for query, command, form, prerender, and getRequestEvent, each of which throws immediately. This file is an internal build fallback rather than a supported public package entry, so application code should not import it directly.

Exactly where it triggers

All five placeholders construct through:

function make_sveltekit_server_error(name: string): Error {
	return new SvelteKitServerExportUnavailableError(name);
}

They throw from these exact placeholders:

For reference, the class itself is declared at modules/svelte-effect-runtime/src/errors.ts L786 @ C14.

Why this is the case

SvelteKit's compilation environment provides $app/server; plain Node execution cannot load it as an ordinary file. SER still needs a publish-time module shape to build the package, although that fallback cannot implement route-bound remote helpers or request lookup.

Failing immediately by name prevents the shim from behaving like a partial server implementation. The recorded export identifies which virtual capability was requested outside the environment that owns it.