This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
'/nuxt-i18n/options.js' does not provide an export named 'localeMessages' #156
Labels
bug
Something isn't working
Comments
I'm not sure why is that but just gonna add this extra screenshot: @pi0 any extra considerations that have to be taken into account when using |
I also get this issue with:
|
Use // nuxt.config.js
i18n: {
locales:
[{
code: 'zh',
file: 'zh-HK.js'
}, {
code: 'en',
file: 'en-GB.js'
}],
defaultLocale: 'zh',
langDir: 'lang/', // <---
vueI18n: {
fallbackLocale: 'zh',
}
}, // lang/en-GB.js
export default {
welcome: 'Welcome'
} // package.json
"nuxt": "^2.15.7",
"nuxt-vite": "^0.1.0",
"nuxt-i18n": "^6.27.2", It looks like the plugin checks for // node_modules/nuxt-i18n/src/templates/options.js
if (langDir) { %>
export const localeMessages = {
... See documentation for landDir option and translation files |
Thanks for that. So it's actually an issue with nuxt-i18n. Fixing in nuxt-modules/i18n#1251. |
rchl
added a commit
to nuxt-modules/i18n
that referenced
this issue
Aug 2, 2021
The import needs to be provided since it's imported unconditionally. Fixes nuxt/vite#156
rchl
added a commit
to nuxt-modules/i18n
that referenced
this issue
Aug 2, 2021
The import needs to be provided since it's imported unconditionally. Fixes nuxt/vite#156
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Versions
nuxt-vite: 0.1.1
nuxt: 2.15.7
Reproduction
Non-existent export 'localeMessages' is imported from resources/assets/js/.nuxt/nuxt-i18n/options.js
Description
The text was updated successfully, but these errors were encountered: