Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__VUE_I18N__ is undefined in produciton mode #89

Open
upgreidas opened this issue Aug 31, 2022 · 1 comment
Open

__VUE_I18N__ is undefined in produciton mode #89

upgreidas opened this issue Aug 31, 2022 · 1 comment

Comments

@upgreidas
Copy link

upgreidas commented Aug 31, 2022

If I want access vueApp.VUE_I18N.global.t or vueApp.VUE_I18N.global.locale it works only when I run npm run dev. In production mode it gives "Cannot read properties of undefined (reading 'global')" error.

My dependencies:
"@intlify/nuxt3": "^0.2.3",
"nuxt": "3.0.0-rc.6",

@umitkara
Copy link

umitkara commented Oct 12, 2022

I'm using nuxt 3.0.0-rc.11 and @intlify/nuxt3 0.2.4. Same issue.:
[unhandledRejection] Cannot read properties of undefined (reading '$i18n')
Can not deploy or generate static site.

Update:
I resolved my issue using:
import { useI18n } from 'vue-i18n'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants