Cannot read property 'locale' of undefined
See original GitHub issueHi.I use the vue-router with vue-i18n together,when i changed the path,chrome remind a issue
my i18n.js
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import cn from './zh-CN.json'
import jh from './zh-JH.json'
import store from '../store'
Vue.use(VueI18n)
export default new VueI18n({
locale: 'zh-JH',
messages: {
'zh-CN': cn,
'zh-JH': jh
}
})
vue & vue-i18n version
```"vue": "^2.1.0",
"vue-i18n": "^6.0.0-alpha.2",
"vue-router": "^2.0.1",```
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:57 (18 by maintainers)
Top Results From Across the Web
Cannot read property 'locales' of undefined - Stack Overflow
I have that. Cannot read property 'locales' of undefined. error when using select2-rails. It raises somewhere here. fn.select2.locales.ru.
Read more >TypeError: Cannot read property 'locale' of undefined - Forums
Hi! I have a very simple Lambda function (with default and basic configuration) that is throwing the following error.
Read more >Locale issue. Cannot read property 'replace' of undefined
We have been getting the above error and I am guessing it it because of the locale. What is the best way to...
Read more >How to fix Vue I18n Uncaught TypeError - Our Code World
... I18n Uncaught TypeError: Cannot read property 'config' of undefined ... i18n = new VueI18n({ // set locale locale: 'en', // set locale ......
Read more >Cannot set property 'locale' of undefined got when input Enter ...
TypeError : Cannot set property 'locale' of undefined got when input Enter directly in console. ... A clear and concise description of what...
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
https://github.com/ChangJoo-Park/vue-i18n-error
Here is my repo
in the
locales
directory,Error message
Is this Webpack issue?
@kazupon Hi. I have successfully reproduced the bug thanks to @zce 's advice!
https://github.com/h6ah4i/vue-i18n-issue-118-sample