NuxtN
Nuxtβ€’9mo ago
Uzyxen

i18n [plugin:nuxtjs:i18n-resource] Cannot read properties of undefined (reading 'options')

I downloaded NuxtI18n, added
  i18n: {
    vueI18n: './i18n.config.ts' ,
    bundle: {
      optimizeTranslationDirective: false,
    },
    locales: [
      { code: 'en', language: 'en-US' },
      { code: 'nl', language: 'nl-NL' }
    ],
    defaultLocale: 'en',
  },
to my nuxt.config.ts, and

export default defineI18nConfig(() => ({
    legacy: false,
    locale: 'en',
    messages: {
      en: {
        welcome: 'Welcome'
      },
      nl: {
        welcome: 'Welkom'
      }
    }
}));


to i18n/i18n.config.ts, but I have error [plugin:nuxtjs:i18n-resource] Cannot read properties of undefined (reading 'options') /Users/uzyxen/Desktop/active-projects/<project-name>/i18n/i18n.config.ts
Was this page helpful?