Vue Router: [Vue Router warn]: No match found for location with path "/users/42"
The router has no route record matching that path (typo, missing route, or case/base issue).
[Vue Router warn]: No match found for location with path "/users/42"No match found for location with path[Vue Router warn]: No match found for location with path "/"Vue Router no match found for location Meaning
Add the route or fix the path, check base in createWebHistory(base), route order for wildcard routes (/:pathMatch(.*)* last), case sensitivity and trailing slashes. For programmatic router.push({ name }) the route name must exist.
Common causes
- Route not defined
- Wrong base path
- Typo/case in path
- Named route misspelled
- Catch-all route missing or misplaced
⚡ Quick fix
- Define the route (
{ path: "/users/:id", component: User }) - Add a catch-all 404:
{ path: "/:pathMatch(.*)*", component: NotFound } - Verify
createWebHistory(import.meta.env.BASE_URL)
Detailed fix by platform
Vue
routes: [{ path: "/:pathMatch(.*)*", name: "NotFound", component: () => import("./NotFound.vue") }]
How to diagnose
- Route — Defined?
- Base — Correct?
- Catch-all — Last?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- 404 on page refresh (history mode) Browser: Cannot GET /users/42 — refreshing a Vue Router history-mode page returns 404
- Conflicting app and page file was found Next.js: ⨯ Conflicting app and page file was found, please remove the conflicting files to continue: "pages/index.tsx" - "app/page.tsx"
- injection "Symbol(router)" not found / useRouter() called without router Vue Router: [Vue warn]: injection "Symbol(router)" not found. / Cannot read properties of undefined (reading 'push')
Most viewed in Vue
- Property was accessed during render but is not defined Vue: [Vue warn]: Property "x" was accessed during render but is not defined on instance
- Failed to resolve component Vue: [Vue warn]: Failed to resolve component: x
- Avoid mutating a prop directly Vue: [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026