I'm building a Nuxt site with the Nuxt i18n module and the Prismic module. It seems to build fine and run fine, although I've still not tried the "preview" feature, except when I do a dev or production build, I get this warning from Nuxt:
WARN [@nuxtjs/i18n] Couldn't read page component file (ENOENT: no such file or directory, open '/site-path/.nuxt/prismic/pages/preview.vue')
If I run generate
and see a list of the routes it builds, I see this:
ℹ Generating pages 22:56:40
✔ Generated route "/fr" 22:56:42
✔ Generated route "/preview" 22:56:42
✔ Generated route "/en" 22:56:42
✔ Generated route "/fr/preview" 22:56:42
✔ Generated route "/en/preview" 22:56:42
✔ Generated route "/" 22:56:42
✔ Generated route "/fr/test" 22:56:44
✔ Generated route "/test" 22:56:44
✔ Generated route "/en/test"
I suppose the preview file may not be found because i18n is forcing this route parameter of /en
or /fr
My i18n module config is:
// i18n module configuration: https://i18n.nuxtjs.org/setup
i18n: {
locales: ['en', 'fr'],
defaultLocale: 'en',
// add /en/ URL prefix
strategy: 'prefix',
},
Is this something I can fix in the configuration? I will soon want to use the Preview feature.