Contentful logo

Contentful Community

Nuxt static + nuxt-i18n - need help!

Hello everyone,

I am trying to build myself a personal multi-lingual blog where I can publish my articles in german (default) and english.
Therefore I am using nuxt (2.14.0) in static mode fetching content data from Contentful (7.14.6) to generate the necessary html files. For handling internationalization I use nuxt-i18n (6.15.4) with strategy “prefix”. For testing purpose I have created a single blog entry with all fields in german and english.

When I invoke the generate command, the following is reported:

...
✔ Generated route "/en/major-tech-companies-about-to-leave-silicon-valley"                                               10:04:31
✔ Generated route "/de/bekannte-tech-unternehmen-verlassen-das-silicon-valley"

So far so good, the same blog entry is created in both locales with the according prefix. But the generator tries to setup each route for the respectively opposite locale, leading to errors of course:

 ERROR   /en/bekannte-tech-unternehmen-verlassen-das-silicon-valley
 TypeError: Cannot read property 'fields' of undefined
 at a.render (pages/_name/index.vue?663c:1:0)
 ...

 ERROR   /de/major-tech-companies-about-to-leave-silicon-valley
 TypeError: Cannot read property 'fields' of undefined
  at a.render (pages/_name/index.vue?663c:1:0)
 ...

My question is: Is nuxt’s internal crawler capable of building the routing automatically with i18n or do i have to provide manual configuration elsewhere?