{"record":{"id":"d7fb8b7e14f100be","repo":"vercel/next.js","slug":"segment-names-may-not-start-with-erroneous-periods","errorCode":null,"errorMessage":"Segment names may not start with erroneous periods ('${segmentName}').","messagePattern":"Segment names may not start with erroneous periods \\('(.+?)'\\)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/shared/lib/router/utils/sorted-routes.ts","lineNumber":116,"sourceCode":"        throw new Error(\n          `Detected a three-dot character ('…') at ('${segmentName}'). Did you mean ('...')?`\n        )\n      }\n\n      if (segmentName.startsWith('...')) {\n        // Strip `...`, leaving only `something`\n        segmentName = segmentName.substring(3)\n        isCatchAll = true\n      }\n\n      if (segmentName.startsWith('[') || segmentName.endsWith(']')) {\n        throw new Error(\n          `Segment names may not start or end with extra brackets ('${segmentName}').`\n        )\n      }\n\n      if (segmentName.startsWith('.')) {\n        throw new Error(\n          `Segment names may not start with erroneous periods ('${segmentName}').`\n        )\n      }\n\n      function handleSlug(previousSlug: string | null, nextSlug: string) {\n        if (previousSlug !== null) {\n          // If the specific segment already has a slug but the slug is not `something`\n          // This prevents collisions like:\n          // pages/[post]/index.js\n          // pages/[id]/index.js\n          // Because currently multiple dynamic params on the same segment level are not supported\n          if (previousSlug !== nextSlug) {\n            // TODO: This error seems to be confusing for users, needs an error link, the description can be based on above comment.\n            throw new Error(\n              `You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`\n            )\n          }\n        }","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/shared/lib/router/utils/sorted-routes.ts#L98-L134","documentation":"_insert rejects dynamic segment names that begin with a period after bracket stripping (e.g. a malformed '[.foo]' or a misspelled catch-all). A leading '.' would corrupt the '...' catch-all parsing and periods are invalid in parameter names.","triggerScenarios":"A route segment name starts with erroneous periods.","commonSituations":"Folder names like '[.slug]' with stray periods inside the brackets.","solutions":["Remove the erroneous leading periods from the segment name."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}