sveltejs/kit · error
Invalid route ${id} — parameters must be separated
Error message
Invalid route ${id} — parameters must be separated What it means
Route ID validation error: after unescaping [x+..]/[u+..] sequences, the walker detected adjacent parameter brackets like [a][b] in a single segment. Dynamic parameters in one route segment must be separated by static text (e.g. [lang]-[slug]), because the framework cannot infer the separator. Fires during manifest generation when such a route file/directory exists.
Source
Thrown at packages/kit/src/core/sync/create_manifest_data/index.js:167
if (type === 'x') {
if (code.length !== 2) {
throw new Error(`Hexadecimal escape sequence in ${id} must be two characters`);
}
return String.fromCharCode(parseInt(code, 16));
} else {
if (code.length < 4 || code.length > 6) {
throw new Error(
`Unicode escape sequence in ${id} must be between four and six characters`
);
}
return String.fromCodePoint(parseInt(code, 16));
}
});
if (/\]\[/.test(unescaped)) {
throw new Error(`Invalid route ${id} — parameters must be separated`);
}
if (count_occurrences('[', id) !== count_occurrences(']', id)) {
throw new Error(`Invalid route ${id} — brackets are unbalanced`);
}
if (/#/.test(segment)) {
// Vite will barf on files with # in them
throw new Error(`Route ${id} should be renamed to ${id.replace(/#/g, '[x+23]')}`);
}
if (/\[\.\.\.[\w-]+\]\/\[\[/.test(id)) {
throw new Error(
`Invalid route ${id} — an [[optional]] route segment cannot follow a [...rest] route segment`
);
}
if (/\[\[\.\.\./.test(id)) {View on GitHub (pinned to 03f1687fe6)
Solutions
- Insert static text between the parameters, e.g. rename [lang][slug] to [lang]-[slug]
- Split the parameters across nested directories so each segment has one parameter
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/kit/src/core/sync/create_manifest_data/index.js:167 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/32ad5df4986ba946.
Report an issue: GitHub.