-
-
Notifications
You must be signed in to change notification settings - Fork 862
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
TypeError: Cannot redefine property: $i18n #421
Comments
I can confirm that this fixes the problem, any idea on when it will get merged into master? |
Me too I confirm this solve the problem ! |
@jgribonvald There is a possibility that this problem is caused by the vue-i18n build setting problem. Would you be able to try to use the dist files (dist/*.js) that build with build confg of dev branch please? |
@kazupon
I've updated the fiddle : https://jsfiddle.net/jgribonvald/cmyk6Lua/ |
@jgribonvald Could you try the checking now please? 🙏 |
@kazupon sorry for the delay
|
@jaredzhu1993 I found the strange javascript codes in your jsfiddle reproduction. Could you provide the minimum reproduction codes with repository please? 🙏 |
In my mind the problem is that we have 2 web components (that are 2 repositories) including their dependency of vue-i18n, and so as it's builded and loaded separately they try to load twice vue-i18n whereas there is only on vuejs instance.
is working ! It means that it check that vue-i18n isn't already registered into vuejs. On an other side why not having an independant plugin ? used as a service... here a new jsfiddle : https://jsfiddle.net/jgribonvald/j4zq58dy/ and look at console |
I have released v8.1.1 |
this doesn't not solve the problem |
@kazupon : thanks a lot ! |
@HadiChen * fix TypeError: Cannot redefine property: $i18n fix kazupon/vue-i18n#421 * flow:$FlowFixMe with object literal
@HadiChen * fix TypeError: Cannot redefine property: $i18n fix kazupon/vue-i18n#421 * flow:$FlowFixMe with object literal
vue & vue-i18n version
ex: 2.5.17, 8.0.0
vue:2.5.17
vue-i18n:8.0.0
nuxt.js:1.4.2
Reproduction Link
Steps to reproduce
What is Expected?
What is actually happening?
vue-i18n/src/extend.js
Line 5 in 170f691
fix bug edit
The text was updated successfully, but these errors were encountered: