sveltejs/kit · error · Error
Instrumentation initializer ${initializer} not found. This i
Error message
Instrumentation initializer ${initializer} not found. This is probably a bug in your adapter. What it means
Third guard in `builder.instrument`: the optional instrumentation initializer file must exist if the adapter passed one. Missing initializer means the adapter referenced a file it never emitted — flagged as an adapter bug.
Source
Thrown at packages/kit/src/core/adapt/builder.js:337
instrumentation,
start = path.join(path.dirname(entrypoint), 'start.js'),
initializer,
module = {
exports: ['default']
}
}) {
if (!existsSync(instrumentation)) {
throw new Error(
`Instrumentation file ${instrumentation} not found. This is probably a bug in your adapter.`
);
}
if (!existsSync(entrypoint)) {
throw new Error(
`Entrypoint file ${entrypoint} not found. This is probably a bug in your adapter.`
);
}
if (!existsSync(initializer)) {
throw new Error(
`Instrumentation initializer ${initializer} not found. This is probably a bug in your adapter.`
);
}
copy(entrypoint, start);
if (existsSync(`${entrypoint}.map`)) {
copy(`${entrypoint}.map`, `${start}.map`);
}
const relative_instrumentation = posixify(
path.relative(path.dirname(entrypoint), instrumentation)
);
const relative_start = posixify(path.relative(path.dirname(entrypoint), start));
const relative_initializer = posixify(path.relative(path.dirname(entrypoint), initializer));
const facade =
'generateText' in module
? module.generateText({View on GitHub (pinned to 03f1687fe6)
Solutions
- Update the adapter to a SvelteKit-compatible version
- Clean build output and rebuild
- Report the bug to the adapter maintainers if it persists
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from 'node:fs';
if (initializer && !existsSync(initializer)) {
console.error('Initializer missing; adapt config before calling instrument()');
} Prevention
- Only pass `initializer` when your adapter actually emits that file
- Rebuild from a clean output directory on weird failures
- Pin adapter versions tested against your SvelteKit version
When it happens
Trigger: `instrument` is called with an `initializer` path and `existsSync(initializer)` is false.
Common situations: Adapter bug, stale/partial build output, or adapter/SvelteKit version mismatch changing where the initializer is generated.
Related errors
- Instrumentation file ${instrumentation} not found. This is p
- Entrypoint file ${entrypoint} not found. This is probably a
- The `generateManifest` adapter API has been removed — use `g
- ${resolved_instrumentation} is unsupported in ${svelte_confi
- Reading `config.kit` inside adapters is deprecated — it shou
AI-assisted analysis of sveltejs/kit@03f1687fe6 (2026-09-02).
Data as JSON: /api/errors/98e678c4a230d582.
Report an issue: GitHub.