mololab / json-translator

jsontt 💡 - AI JSON Translator + other FREE translation modules to translate your json/yaml files into other languages ✅ Check Readme ✌
https://mololab.org/jsontt/npm
MIT License
427 stars 53 forks source link

TypeError: Cannot read properties of undefined (reading 'length') #16

Closed emres8 closed 1 year ago

emres8 commented 1 year ago

Hi, firstly great work. I am trying to use sample usage 5 (multiple language) on js for a very simple short json. It gives me an error:

Translation error: TypeError: Cannot read properties of undefined (reading 'length') at _callee$ (translate/node_modules/@parvineyvazov/json-translator/dist/json-translator.cjs.development.js:513:36).

I fixed the issue by adding a ? to the given line if (!(global.proxyList?.length > 0 && global.proxyIndex != -1)) {. But couldn't understand why global.proxylist is undefined. Any recommendations on how to proceed? Thanks

ParvinEyvazov commented 1 year ago

Hi @emres8 , Thank you for your comment.

First I would like to ask, are you using a proxy or the default one (without any proxy)?

emres8 commented 1 year ago

default one

emres8 commented 1 year ago

I am using the default one (without any proxy), should I use one?

ParvinEyvazov commented 1 year ago

Hi again @emres8 , I just released a new patch version v1.4.1 to fix this issue. Can you please try now?