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.

Route is break when nuxt.config is updated

See original GitHub issue

Version

v5.8.5

Reproduction link

Not really needed

Steps to reproduce

  1. Install nuxt-i18n
  2. Create routes with like config :
[
  'nuxt-i18n',
  {
  locales: [
    { code: 'en', name: 'English', iso: 'en-US', file: 'en.js' },
    { code: 'fr', name: 'Français', iso: 'fr-FR', file: 'fr.js' }
  ],
  defaultLocale: 'en',
  lazy: true,
  langDir: 'locale/',
  vueI18n: {
  fallbackLocale: 'en',
  dateTimeFormats: {
    fr: {
      long: {
        year: 'numeric',
        month: 'long',
        day: 'numeric',
        weekday: 'long'
      },
      timeShort: {
        year: 'numeric',
        month: 'numeric',
        day: 'numeric',
        hour: 'numeric',
        minute: 'numeric'
      },
      timeLong: {
        year: 'numeric',
        month: 'long',
        day: 'numeric',
        weekday: 'long',
        hour: 'numeric',
        minute: 'numeric'
      }
    },
    en: {
      long: {
        year: 'numeric',
        month: 'long',
        day: 'numeric',
        weekday: 'long'
      },
      timeShort: {
        year: 'numeric',
        month: 'numeric',
        day: 'numeric',
        hour: 'numeric',
        minute: 'numeric'
      },
      timeLong: {
        year: 'numeric',
        month: 'long',
        day: 'numeric',
        weekday: 'long',
        hour: 'numeric',
        minute: 'numeric'
      }
    }
  },
  detectBrowserLanguage: {
    useCookie: true,
    alwaysRedirect: true,
    fallbackLocale: 'en'
  },
  onLanguageSwitched: (previous, current) => {
    if (process.client) {
      cookie.serialize('i18n_redirected', current, {
        expires: new Date(new Date() + 365),
        path: '/'
      })
    }
  }
]
  1. Update nuxt.config.js

What is expected ?

Just update

What is actually happening?

When nuxt.config.js is updated we have

 WARN  [vue-router] Route with name 'index___en' does not exist                                                               11:26:56
 WARN  [vue-router] Route with name 'index___fr' does not exist                                                               11:26:56
<div align="right">This bug report is available on Nuxt community (#c220)</div>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
orblazercommented, Jun 13, 2019

@Atinux probably yes, i can’t try beacause i no longer use nuxt for now

0reactions
Atinuxcommented, Jun 13, 2019

Should this issue be closed since https://github.com/nuxt-community/nuxt-i18n/pull/291 is merged?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Route is break when nuxt.config is updated #259 - GitHub
What is actually happening? When nuxt.config.js is updated we have. WARN [vue-router] Route with name 'index___en' does not exist 11 ...
Read more >
How to configure nuxt or a webpage so routes stay without ...
Try to set trailingSlash option to false in router configs in nuxt.config.js. https://nuxtjs.org/api/configuration-router#trailingslash.
Read more >
Upgrading - Nuxt
Update the version specified for the nuxt package in your package.json file. After this step instructions vary depending upon whether you are using...
Read more >
Migrating Breaking Changes in SvelteKit - Netlify
Now all routes are directory based, other than the home or root route, all new routes need to be in a folder. The...
Read more >
Routing and Route Protection in Server-Rendered Vue Apps ...
Setting Up a Nuxt.js App from Scratch. You can quickly scaffold a new project using the Vue CLI tool by running the following...
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