{"record":{"id":"9491cf6807a00c12","repo":"sveltejs/kit","slug":"route-id-should-be-renamed-to-id-replace-g","errorCode":null,"errorMessage":"Route ${id} should be renamed to ${id.replace(/#/g, '[x+23]')}","messagePattern":"Route (.+?) should be renamed to (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/kit/src/core/sync/create_manifest_data/index.js","lineNumber":176,"sourceCode":"\t\t\t\t\t\t\t`Unicode escape sequence in ${id} must be between four and six characters`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn String.fromCodePoint(parseInt(code, 16));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (/\\]\\[/.test(unescaped)) {\n\t\t\t\tthrow new Error(`Invalid route ${id} — parameters must be separated`);\n\t\t\t}\n\n\t\t\tif (count_occurrences('[', id) !== count_occurrences(']', id)) {\n\t\t\t\tthrow new Error(`Invalid route ${id} — brackets are unbalanced`);\n\t\t\t}\n\n\t\t\tif (/#/.test(segment)) {\n\t\t\t\t// Vite will barf on files with # in them\n\t\t\t\tthrow new Error(`Route ${id} should be renamed to ${id.replace(/#/g, '[x+23]')}`);\n\t\t\t}\n\n\t\t\tif (/\\[\\.\\.\\.[\\w-]+\\]\\/\\[\\[/.test(id)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Invalid route ${id} — an [[optional]] route segment cannot follow a [...rest] route segment`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (/\\[\\[\\.\\.\\./.test(id)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Invalid route ${id} — a rest route segment is always optional, remove the outer square brackets`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst { pattern, params } = parse_route_id(id);\n\n\t\t\t/** @type {import('types').RouteData} */\n\t\t\tconst route = {","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/sveltejs/kit/blob/03f1687fe612ce3d2d9131139b5b188d9cf90c64/packages/kit/src/core/sync/create_manifest_data/index.js#L158-L194","documentation":"Route ID validation error: the current route segment contains a '#' character. Vite cannot handle module requests for files containing '#', so SvelteKit rejects such route names and suggests the escape form [x+23], which produces the same URL path segment '#' at runtime. Fires during route walking in sync/dev.","triggerScenarios":"Thrown at packages/kit/src/core/sync/create_manifest_data/index.js:176 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rename the file replacing '#' with '[x+23]', e.g. 'page#1' becomes 'page[x+23]1'","Avoid hash characters in route file and directory names"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"03f1687fe612ce3d2d9131139b5b188d9cf90c64","analyzedAt":"2026-09-02T02:01:50.504Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}