sveltejs/kit · error · Error

Asset does not exist

Error message

Asset does not exist: ${file}

What it means

Runtime guard inside read() from $app/server: after stripping the assets prefix and decoding, the requested file key is not present in the generated manifest's server_assets map, meaning the asset was never recorded as a server-readable asset during build. Typically happens when the imported path doesn't match a built asset (wrong import, stale build, or asset excluded from the manifest).

Solutions

  1. Import the asset by its module path and pass the resulting URL to read(), rather than hand-writing a path
  2. Rebuild the app so the manifest's server_assets entries are regenerated
  3. Check for typos or hash mismatches in the asset path
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/kit/src/runtime/app/server/index.js:74 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sveltejs/kit@03f1687fe6 (2026-09-02). Data as JSON: /api/errors/03b74daa2350f743. Report an issue: GitHub.

Appendix: source

Thrown at packages/kit/src/runtime/app/server/index.js:74

	const file = decodeURIComponent(
		__SVELTEKIT_DEV__ && asset.startsWith(assets + '/@fs')
			? asset.slice(assets.length)
			: asset.slice(assets.length + 1)
	);

	if (file in manifest.server_assets) {
		const length = manifest.server_assets[file];
		const type = manifest.mime_types[file.slice(file.lastIndexOf('.'))];

		return new Response(read_implementation(file), {
			headers: {
				'Content-Length': '' + length,
				'Content-Type': type
			}
		});
	}

	throw new Error(`Asset does not exist: ${file}`);
}

export { getRequestEvent } from '@sveltejs/kit/internal/server';

export { query, prerender, command, form, requested } from './remote/index.js';

View on GitHub (pinned to 03f1687fe6)