{"record":{"id":"f7f5e5abd200c38e","repo":"vuejs/vue-router","slug":"route-with-name-name-does-not-exist","errorCode":null,"errorMessage":"Route with name '${name}' does not exist","messagePattern":"Route with name '(.+?)' does not exist","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/create-matcher.js","lineNumber":62,"sourceCode":"    }\n  }\n\n  function getRoutes () {\n    return pathList.map(path => pathMap[path])\n  }\n\n  function match (\n    raw: RawLocation,\n    currentRoute?: Route,\n    redirectedFrom?: Location\n  ): Route {\n    const location = normalizeLocation(raw, currentRoute, false, router)\n    const { name } = location\n\n    if (name) {\n      const record = nameMap[name]\n      if (process.env.NODE_ENV !== 'production') {\n        warn(record, `Route with name '${name}' does not exist`)\n      }\n      if (!record) return _createRoute(null, location)\n      const paramNames = record.regex.keys\n        .filter(key => !key.optional)\n        .map(key => key.name)\n\n      if (typeof location.params !== 'object') {\n        location.params = {}\n      }\n\n      if (currentRoute && typeof currentRoute.params === 'object') {\n        for (const key in currentRoute.params) {\n          if (!(key in location.params) && paramNames.indexOf(key) > -1) {\n            location.params[key] = currentRoute.params[key]\n          }\n        }\n      }\n","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/vuejs/vue-router/blob/680ccc68c506cca9be6207745043245d61fa715a/src/create-matcher.js#L44-L80","documentation":"Development-mode warning emitted by the router's matcher when router.push/router.replace (or a <router-link :to>) resolves a location by name, but no route record registered under that name in the route map (nameMap). It fires because the named route was never declared, was renamed, is registered on a nested child only reachable under a different name, or the routes array was not registered before navigation. Since no record exists, the matcher falls back to _createRoute(null, location), which typically yields an empty/no-match route instead of the intended component.","triggerScenarios":"Thrown at src/create-matcher.js:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the routes array passed to new Router({ routes }) and ensure a route with the exact `name` string exists","Fix typos or casing mismatches between the navigation target name and the route's declared name","If the target is a nested child, reference its own `name` property, not the parent's","Ensure the routes are registered before the navigation happens (e.g., router.addRoutes for dynamically added routes)","Use a path-based location ({ path: '/target' }) instead of a name when the route is intentionally unnamed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"680ccc68c506cca9be6207745043245d61fa715a","analyzedAt":"2026-09-02T19:19:01.204Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}