nuxt start wants locales from project, not from built source
See original GitHub issueVersion
nuxt-i18n: 6.13.4 nuxt: 2.14.0
Nuxt configuration
mode:
- universal
Nuxt-i18n configuration
This is the generated configuration dist/nuxt-i18n/options.js
Be aware, we’re only using one language, for sake of testing/reproducability we’ve added a 2nd language.
export const vueI18n = {}
export const vueI18nLoader = false
export const locales = [{"name":"German","code":"de","iso":"de-DE","file":"de-DE.json"},{"name":"Swiss-German","code":"ch","iso":"de-CH","file":"de-CH.json"}]
export const defaultLocale = 'de'
export const routesNameSeparator = '___'
export const defaultLocaleRouteNameSuffix = 'default'
export const strategy = 'prefix_except_default'
export const lazy = true
export const langDir = 'locales/'
export const rootRedirect = null
export const detectBrowserLanguage = {"useCookie":true,"cookieDomain":null,"cookieKey":"i18n_redirected","alwaysRedirect":false,"fallbackLocale":""}
export const differentDomains = false
export const seo = false
export const baseUrl = ''
export const vuex = {"moduleName":"i18n","syncLocale":false,"syncMessages":false,"syncRouteParams":true}
export const parsePages = true
export const pages = {}
export const beforeLanguageSwitch = () => null
export const onLanguageSwitched = () => null
export const IS_UNIVERSAL_MODE = true
export const MODULE_NAME = 'nuxt-i18n'
export const LOCALE_CODE_KEY = 'code'
export const LOCALE_ISO_KEY = 'iso'
export const LOCALE_DOMAIN_KEY = 'domain'
export const LOCALE_FILE_KEY = 'file'
export const STRATEGIES = {"PREFIX":"prefix","PREFIX_EXCEPT_DEFAULT":"prefix_except_default","PREFIX_AND_DEFAULT":"prefix_and_default","NO_PREFIX":"no_prefix"}
export const COMPONENT_OPTIONS_KEY = 'nuxtI18n'
export const defaultLangFile = 'de-DE.json'
export const hasNonDefaultLangFiles = true
export const localeCodes = ["de","ch"]
export const trailingSlash = undefined
Steps to reproduce
Run yarn build --production
move/delete your locales folder (from your project)
Run yarn start
What is Expected?
It is expected that nuxt-i18n uses the locales from generated (dist) folder.
What is actually happening?
It tries to use locales file from our local project. The source files are not available in our docker image.
If you need help to reproduce, we can set up a Zoom call, or I can try to provide further information if needed. This bug was introduced recently, most likley with the update to 6.13.3/4.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
Top Results From Across the Web
Nuxt Local Server Gets Stuck · Issue #6442 - GitHub
I have had this issue since I started a new project using version 2.10. Sometimes when I inspect the CSS in Chrome, there...
Read more >The build Property - Nuxt
Nuxt lets you customize the webpack configuration for building your web application as you want.
Read more >Configuration - Nuxt
The css Property Nuxt lets you define the CSS files/modules/libraries you want to set globally (included in every page). In case you want...
Read more >Commands and Deployment - Nuxt
nuxt dev - Launch the development server. nuxt build - Build and optimize your application with webpack for production. nuxt start - Start...
Read more >Plugins directory - Nuxt
Plugins directory. The plugins directory contains your Javascript plugins that you want to run before instantiating the root Vue.js Application.
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
Resolved in v6.13.5
Thanks for good reports and sorry for the breakage. 😃
Let me do some substantial refactor to fix it and hopefully not break anything more in the process…