sveltejs/kit · error · Error
The `generateManifest` adapter API has been removed — use `g
Error message
The `generateManifest` adapter API has been removed — use `generateServerInstance` or `builder.manifest` instead. You may need to update your adapter
What it means
SvelteKit removed the `generateManifest` Builder API from the adapt pipeline. Builders (adapters) still calling the old method hit a stub that throws, directing them to the replacement APIs `generateServerInstance` or `builder.manifest`.
Source
Thrown at packages/kit/src/core/adapt/builder.js:223
const variables = explicit_env_config ?? {};
/** @type {Record<string, StandardSchemaV1.Issue[]>} */
const issues = {};
for (const [name, config] of Object.entries(variables)) {
if (config.static || !config.public) continue;
values[name] = validate(variables, env[name], name, issues);
}
handle_issues(issues);
const payload = devalue.uneval(values);
write(`${dest}/env.js`, `export const env=${payload}`);
},
generateManifest() {
throw new Error(
'The `generateManifest` adapter API has been removed — use `generateServerInstance` or `builder.manifest` instead. You may need to update your adapter'
);
},
generateServerInstance(dest, { routes: subset, serverDirectory } = {}) {
const relative = relative_path(
path.dirname(dest),
serverDirectory ?? this.getServerDirectory()
);
write(
dest,
dedent`
import { Server } from '${relative}/index.js';
const manifest = ${generate_manifest({
build_data,
prerendered: prerendered.paths,
relative_path: relative,
routes: subsetView on GitHub (pinned to 03f1687fe6)
Solutions
- Update the adapter package to a version supporting the new Builder API
- Replace `generateManifest` usage in custom adapter code with `generateServerInstance` or `builder.manifest`
- Pin SvelteKit to an older version only as a temporary stopgap
Example fix
// before (adapter)
const manifest = builder.generateManifest(routes);
// after
const instance = builder.generateServerInstance(dest, { routes, serverDirectory }); Defensive patterns
Strategy: try-catch
Validate before calling
// custom adapter: feature-detect before calling
if (typeof builder.generateManifest === 'function' && builder.generateManifest.toString().includes('has been removed')) {
throw new Error('Update adapter: use generateServerInstance or builder.manifest');
} Try / catch
try {
await adapter.adapt(builder);
} catch (e) {
if (String(e.message).includes('generateManifest')) {
console.error('Your adapter uses a removed SvelteKit API — upgrade it');
}
throw e;
} Prevention
- Keep adapters updated in lockstep with SvelteKit
- Read SvelteKit changelogs for removed Builder APIs before upgrading
- Feature-detect Builder methods in custom adapters
When it happens
Trigger: An adapter's `adapt` implementation calls `builder.generateManifest(...)` during `pnpm build` / adaptation.
Common situations: Using an outdated third-party adapter written against the pre-removal Builder API after upgrading SvelteKit.
Related errors
- Instrumentation file ${instrumentation} not found. This is p
- Entrypoint file ${entrypoint} not found. This is probably a
- Instrumentation initializer ${initializer} not found. This i
- SvelteKit configuration (${keys}) no longer lives inside a `
- The `${keypath}` option has been removed. Please see the lis
AI-assisted analysis of sveltejs/kit@03f1687fe6 (2026-09-02).
Data as JSON: /api/errors/a781a104675f8e6a.
Report an issue: GitHub.