i18n icon indicating copy to clipboard operation
i18n copied to clipboard

TrailingSlash clashes with dynamic routes on generate

Open dreitzner opened this issue 4 years ago • 0 comments

Version

  • @nuxtjs/i18n: 7.2.0
  • nuxt: 2.15.8
  • node: 14.17.6

Nuxt configuration

Please change to [x] if relevant for this issue:

  • [x] Applies to a site deployed to a static server (site generated with nuxt generate)
  • [ ] Applies to a site deployed to a server with a Node backend

@nuxtjs/i18n configuration

i18n: {
    defaultLocale: 'en',
    locales: [
      { code: 'en', iso: 'en-US', name: 'English' },
      { code: 'hr', iso: 'hr-HR', name: 'Croatian' },
    ],
  },

Steps to reproduce

  • in nuxt.config.js
    • router.trailingSlash: true
    • generate.routes: ['/']
  • have only one dynamic entry point (pages/_.vue)
  • run npm run generate

What is Expected?

Generate all pages, starting with the / entry point.

What is actually happening?

Error Message: ERROR Error generating route "/": This page could not be found Without the trailingSlash option the generation works (except for the issue mentioned in #1426 )

dreitzner avatar Apr 15 '22 08:04 dreitzner