Skip to content

After setting serverRoutePrefix in the production environment, it caused the service to crash with infinite redirects. #3898

@JuoJuo

Description

@JuoJuo

Environment

Nuxt root directory: /home/projects/bobbiegoede-nuxt-i18n-starter-r3r6fpul

Nuxt project info:

Operating system Linux 5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
CPU Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (8 cores)
Node.js version v20.19.1
nuxt/cli version 3.31.3
Package manager pnpm@8.15.6
Nuxt version 4.2.2
Nitro version 2.12.9
Builder vite@7.3.0
Config app, devtools, i18n, modules
Modules @nuxtjs/i18n@10.2.1
● 👉 Read documentation: https://nuxt.com
● 👉 Report an issue: https://github.com/nuxt/nuxt/issues/new?template=bug-report.yml
● 👉 Suggest an improvement: https://github.com/nuxt/nuxt/discussions/new

Reproduction

  1. npm run build
  2. node .output/server/index.mjs
  3. Access http://host:3000/product-prefix
  4. Lookat the console, crash with infinite redirects.

Describe the bug

After setting serverRoutePrefix in the production environment, it caused the service to crash with infinite redirects.

Additional context

  • npm run dev works normally, only production env crashes

Logs

Vue Router warn]: No match found for location with path "/lcspoyHL/en/messages.json"
[Vue Router warn]: No match found for location with path "/lcspoyHL/en/messages.json"
[Vue Router warn]: No match found for location with path "/lcspoyHL/en/messages.json"
[Vue Router warn]: No match found for location with path "/lcspoyHL/en/messages.json"
[Vue Router warn]: No match found for location with path "/lcspoyHL/en/messages.json"
[Vue Router warn]: No match found for location with path "/lcspoyHL/en/messages.json"
[Vue Router warn]: No match found for location with path "/lcspoyHL/en/messages.json"
[Vue Router warn]: No match found for location with path "/lcspoyHL/en/messages.json"
....
....
....
....

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions