Nuxt · NUXT0049

Use Nuxt's useRoute in Nuxt app code

Finds Nuxt routing code that should use the supported nuxt useRoute pattern instead.
NUXT0049vite-doctor/nuxtroutingerrorAuto-fix

Run this rule

pnpm nuxt doctor --rules nuxt/routing/prefer-nuxt-useroute

Why it matters

Nuxt's useRoute() wrapper synchronizes route updates with page rendering; the vue-router version can expose route state at a different time.

Use Nuxt’s auto-imported useRoute() inside Nuxt app code.

Example

Use Nuxt useRoute

Before

import { useRoute } from 'vue-router'

const route = useRoute()

After

const route = useRoute()
Copyright © 2026