Skip to content

Cannot read property '__disableEmitter' #133

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

Closed
thisisablock opened this issue Oct 2, 2020 · 6 comments
Closed

Cannot read property '__disableEmitter' #133

thisisablock opened this issue Oct 2, 2020 · 6 comments
Labels
Status: Need More Info Lacks enough info to make progress

Comments

@thisisablock
Copy link

vue & vue-i18n version

  • vue: 3.0.0
  • vue-i18n: 9.0.0-beta.4

What is actually happening?

On Beta 4 i get on a page change with [email protected] an error

vueI18n.__disableEmitter && _vueI18n.__disableEmitter();

it related to

      _vueI18n.__disableEmitter && _vueI18n.__disableEmitter();

On Beta 3 everything works fine

@kazupon
Copy link
Member

kazupon commented Oct 3, 2020

I could not reproduce my environments ... 😞
Could you provide minimum reproduction codes please?

@kazupon kazupon added the Status: Need More Info Lacks enough info to make progress label Oct 3, 2020
@kazupon
Copy link
Member

kazupon commented Nov 1, 2020

close due to in-activity

@kazupon kazupon closed this as completed Nov 1, 2020
@holtwick
Copy link

holtwick commented Mar 29, 2021

I encounter the same problem with version 9.0.0. My projects use latest vite, vue3, vue-router and typescript. Everything worked fine until today. It is only triggered in certain circumstances for special routes. But it disappears if I don't use i18n.

image

        beforeUnmount() {
            const instance = getCurrentInstance();
            /* istanbul ignore if */
            if (!instance) {
                throw createI18nError(22 /* UNEXPECTED_ERROR */);
            }
            /* istanbul ignore if */
            if (((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) && !false) {
                if (this.__emitter) {
                    this.__emitter.off('*', addTimelineEvent);
                    delete this.__emitter;
                }
                const _vueI18n = this.$i18n;
                _vueI18n.__disableEmitter && _vueI18n.__disableEmitter();
                delete this.$el.__INTLIFY__;
            }
            delete this.$t;
            delete this.$tc;
            delete this.$te;
            delete this.$d;
            delete this.$n;
            delete this.$tm;
            i18n.__deleteInstance(instance);
            delete this.$i18n;
        }

@holtwick
Copy link

It somehow seems to end up in the wrong context. The contents of this look like the properties of a component I use:

image

@holtwick
Copy link

Ok, the pages that cause issues use <teleport>. It works if I remove it. I consider this being a bug in either vue3 or i18n. What do you think @kazupon ? Worth reopening the ticket?

@holtwick
Copy link

This seems to be related to a vue bug, in vue 3.0.7 everything works fine again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Need More Info Lacks enough info to make progress
Projects
None yet
Development

No branches or pull requests

3 participants