nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.71k stars 478 forks source link

Vue Router logs unprefixed route as not found #2935

Open Ionys320 opened 5 months ago

Ionys320 commented 5 months ago

Environment

Nuxt project info:

------------------------------
- Operating System: Linux
- Node Version:     v18.18.0
- Nuxt Version:     3.11.2
- CLI Version:      3.11.1
- Nitro Version:    2.9.6
- Package Manager:  npm@10.2.3
- Builder:          -
- User Config:      modules, devtools, i18n
- Runtime Modules:  @nuxtjs/i18n@8.3.1
- Build Modules:    -
------------------------------

Reproduction

https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-5q4tvj

After launching the project, go to the /meow page (without adding a language prefix).

Describe the bug

Using the prefix strategy and redirecting on no prefix (cf config of the reproduction), Vue Router logs the error written below. I guess it happens because Nuxt i18n didn't handle te route yet, but it's logging a lot of errors for nothing, because after i18n adds the right prefix, the route is found.

Additional context

No response

Logs

WARN  [Vue Router warn]: No match found for location with path "/meow"