{"record":{"id":"0ce585175bbe6f6a","repo":"sveltejs/kit","slug":"current-node-component-references-missing-segme","errorCode":null,"errorMessage":"${current_node.component} references missing segment \"${parent_id}\"","messagePattern":"(.+?) references missing segment \"(.+?)\"","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/kit/src/core/sync/create_manifest_data/index.js","lineNumber":475,"sourceCode":"\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (current_route.layout) {\n\t\t\t\t\t/** @type {import('types').PageNode[]} */ (current_route.layout.child_pages).push(\n\t\t\t\t\t\troute.leaf\n\t\t\t\t\t);\n\t\t\t\t\tcurrent_node.parent = current_node = current_route.layout;\n\t\t\t\t\tparent_id = current_node.parent_id;\n\t\t\t\t} else {\n\t\t\t\t\tparent_id = undefined;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcurrent_route = current_route.parent;\n\t\t}\n\n\t\tif (parent_id !== undefined) {\n\t\t\tthrow new Error(`${current_node.component} references missing segment \"${parent_id}\"`);\n\t\t}\n\t}\n\n\t// remove route objects with no route file\n\troutes = routes.filter((route) => route.endpoint || route.leaf || route.layout || route.error);\n\n\t// add parents to error nodes so that we can compute which page options apply to them\n\tfor (const route of routes) {\n\t\tif (!route.error) continue;\n\n\t\t/** @type {import('types').RouteData | null} */\n\t\tlet current_route = route;\n\t\twhile (current_route) {\n\t\t\tif (current_route.layout) {\n\t\t\t\troute.error.parent = current_route.layout;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcurrent_route = current_route.parent;","sourceCodeStart":457,"sourceCodeEnd":493,"githubUrl":"https://github.com/sveltejs/kit/blob/03f1687fe612ce3d2d9131139b5b188d9cf90c64/packages/kit/src/core/sync/create_manifest_data/index.js#L457-L493","documentation":"Route-tree integrity error during manifest creation: while walking a route up to its root layout chain, a parent layout referenced a parameter segment (its parent_id) that no longer exists in the route's segment list — typically caused by mixing parameterized and non-parameterized directories at the same level, so a layout ends up attached to a segment name that is not part of this route.","triggerScenarios":"Thrown at packages/kit/src/core/sync/create_manifest_data/index.js:475 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Restructure the routes so layout directories and their parameterized children are consistent (e.g. avoid [lang]/layout.svelte alongside a non-parameterized sibling route)","Rename the mismatched segment or move the +layout file to a directory that matches the route's segments"],"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"}