Skip to content

nuxt-i18n v6.13.5 incompatible with nuxt v2.13.3 #829

Closed
@coremyslo

Description

Version

nuxt-i18n: 6.13.5 (lower versions are fine)
nuxt: 2.13.3 (higher versions are fine)

Nuxt configuration

mode:

    • universal
    • [] spa

Nuxt-i18n configuration

["nuxt-i18n", {
    differentDomains: true,
    defaultLocale: config.LOCALE_DEFAULT,
    locales,
    parsePages: false,
    pages,
    vueI18n: {
        fallbackLocale: config.LOCALE_FALLBACK,
        silentFallbackWarn: true,
    },
    vueI18nLoader: true,
    vuex: {
        syncMessages: true,
        syncLocale: true,
    },
    lazy: true,
    langDir: 'locales/'
}],

What is actually happening?

image

Activity

rchl

rchl commented on Aug 4, 2020

@rchl
Collaborator

@coremyslo Can you post the locales object also?

Or even complete configuration as I'm not sure what part of the configuration is the culprit.

coremyslo

coremyslo commented on Aug 4, 2020

@coremyslo
Author

@rchl I also tried to remove things to see where is start to break. I've got something like this in the end.

["nuxt-i18n", {
    locales: [
        {
            code: 'fr-FR-local',
            iso: 'fr-FR',
            file: 'index.js',
            domain: 'my.domain.loc:5555'
        }
    ]
}],

UPDATE: actually even below fails with the same error

const nuxtConfig = {
    modules: [
        ["nuxt-i18n", {
            locales: [
                {
                    code: 'fr-FR-local',
                    iso: 'fr-FR',
                    file: 'index.js',
                    domain: 'my.domain.loc:5555'
                }
            ],
        }],
    ],
};

export default nuxtConfig;
rchl

rchl commented on Aug 4, 2020

@rchl
Collaborator

Before I'm gonna do any further investigation, I'd like you to try delete node_modules, re-install dependencies and try again.

I'm starting to think you might be hitting a caching issue nuxt/nuxt#7838 (which is gonna be fixed for next NuxtJS version).

coremyslo

coremyslo commented on Aug 4, 2020

@coremyslo
Author

Deleted yarn.lock and removed node_modules, called yarn and yarn dev -> same issue.

I'm just tried to create an empty project with

// package.json
{
  "name": "test",
  "scripts": {
    "dev": "nuxt"
  },
  "dependencies": {
    "nuxt": "2.13.3",
    "nuxt-i18n": "6.13.5"
  }
}
// nuxt.config.js
const nuxtConfig = {
    modules: [
        ["nuxt-i18n", {
            locales: [
                {
                    code: 'fr-FR-local',
                    iso: 'fr-FR',
                    file: 'index.js',
                    domain: 'my.domain.loc:5555'
                }
            ],
        }],
    ],
};

export default nuxtConfig;

It still reproduces for me.

node v14.4.0
yarn v1.22.4

rchl

rchl commented on Aug 4, 2020

@rchl
Collaborator

OK, thanks. Actually yarn should be unaffected by that caching bug.

I've ignored the fact the you've mentioned that it happens in Nuxt v2.13.3 because I didn't use any new stuff from Nuxt v2.14.0 but yes, I can see it being broken in the older version. Will have a look.

coremyslo

coremyslo commented on Aug 4, 2020

@coremyslo
Author

thanks.

added a commit that references this issue on Aug 4, 2020
4e9569c
added a commit that references this issue on Aug 4, 2020
02f6b99
rchl

rchl commented on Aug 4, 2020

@rchl
Collaborator

Fix released in v6.13.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      nuxt-i18n v6.13.5 incompatible with nuxt v2.13.3 · Issue #829 · nuxt-modules/i18n