Route is break when nuxt.config is updated
See original GitHub issueVersion
Reproduction link
Not really needed
Steps to reproduce
- Install
nuxt-i18n
- 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: '/'
})
}
}
]
- 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:
- Created 4 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Atinux probably yes, i can’t try beacause i no longer use nuxt for now
Should this issue be closed since https://github.com/nuxt-community/nuxt-i18n/pull/291 is merged?