Application in Vuejs / Nuxtjs does not work i18n

I have a vuejs / nuxt application and it is implementing the i18n multi language, in my local environment it is working normally, but when I deploy it to netlify it does not work, the Cannot read properties of undefined (reading ‘source’) error occurs.

https://main--dazzling-toffee-fa74ec.netlify.app/pt

Duplicate of: Site is alive after i18n plugin - Support - Netlify Support Forums

If it’s happening to multiple people, something could be wrong with Nuxt than Netlify. Has someone tried reaching out to them?

Hi there,

We had a similar problem with the i18N Nuxt module - worked perfectly on our dev environment and would fail on build as our langDir folder could not be found.

Turns out we had spelled our locales folder as “Locales” so on the build step it couldn’t find the folder!
Glad we found the issue eventually but only after a rollercoaster of emotions and lots of hair-pulling :smiley:

We changed our langDir folder to lang and set the path to: ‘./lang’ in the config. Git showed that the folders “Lang/en-US” had been removed which helped us identify the problem.

Try changing the name of the folder containing your locales and see how you go.

Here’s our i18N config for reference:

  i18n: {
    lazy: true,
    langDir: "./lang",
    strategy: "prefix_except_default",
    locales: [
      {
        code: "en-US",
        iso: "en-US",
        name: "English(US)",
        file: "en-US.json",
      },
      {
        code: "de-DE",
        iso: "de-DE",
        name: "German(DE)",
        file: "de-DE.json",
      },
    ],
    defaultLocale: "en-US",
  },

Best of luck!

-August Robotics