question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem when used with AMP module (nuxt-i18n since version 6.13.5)

See original GitHub issue

Version

nuxt-i18n: 6.13.5 - 6.13.9 nuxt: 2.12.2

Nuxt configuration

Mode:

  • universal
  • spa

Nuxt-i18n configuration

i18n: {
    parsePages: false,
    lazy: true,
    locales: [
      {
        territory: 'US',
        name: 'English',
        code: 'en',
        iso: 'en',
        file: 'en.json'
      },
      {
        territory: 'ES',
        name: 'Español',
        code: 'es',
        iso: 'es',
        file: 'es.json'
      },
    ],
    detectBrowserLanguage: false,
    vueI18n: {
      fallbackLocale: 'en'
    },
    vuex: {
      syncLocale: true,
      syncMessages: true
    },
    defaultLocale: 'en',
    langDir: 'locales/',
    seo: false
}

Reproduction Link

Sandbox

Steps to reproduce

  1. Go to /amp route.
  2. Go to /amp/es route.

What is Expected?

When we follow the url with /amp, a page should open in the desired language with AMP support.

What is actually happening?

Currently, when following the /amp path, it displays the languageES, although the default is EN. Also, if you try to go to the path /amp/es it will throw an error, although a Spanish AMP page should be open. Changing the version, I found the one that started it - 6.13.5. If you change the version of nuxt-i18n package to 6.13.4 everything works fine with/amp.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
Manfiescommented, Aug 19, 2020

Hi @rchl. I have a small question about nuxt-i18n and nuxt-redirect modules. I think that it’s issue, but i am not sure. I have updated the sandbox for reproduce. If you will try to get access to path /foo (or any other page that not existing) with current version of nuxt-i18n package (6.13.10) it will Too many requests error. But with version of package is6.12.0 it works fine. What’s really happening: every non-existent standard language page now has an error Too many requests instead of 404, when we are using trailing slash at the end as default.

0reactions
Manfiescommented, Aug 19, 2020

@rchl Sure. 5-10 min.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem when used with AMP module (nuxt-i18n ... - GitHub
I have a small question about nuxt-i18n and nuxt-redirect modules. I think that it's issue, but i am not sure. I have updated...
Read more >
Can not use nuxt-i18n (version 5.4.2) - Stack Overflow
In my Nuxt.js application, I want to use the newest version (5.4.2) of nuxt-i18n. I used it previously without any problems, but I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found