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

Uncaught ReferenceError: Translator is not defined #318

Open
dubitoph opened this issue Apr 30, 2021 · 1 comment
Open

Uncaught ReferenceError: Translator is not defined #318

dubitoph opened this issue Apr 30, 2021 · 1 comment

Comments

@dubitoph
Copy link

Hello,

I'm using Symfony 5.1, webpack Encore 1.8 and bazinga-translator 4.0.1. I have this error :

Uncaught ReferenceError: Translator is not defined

Howerver, I import the module in the app.js like this :

import Translator from 'bazinga-translator';
window['Translator'] = Translator;

I don't understand this mistake.

@GGarmy
Copy link

GGarmy commented Oct 19, 2021

Hello,

I had the same issue, but I soved it via :

const Translator = require('bazinga-translator');
global.Translator = window.Translator = Translator;

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