Cannot read properties of undefined (reading 'name')
saikarthikp9 opened this issue · 1 comments
saikarthikp9 commented
As per the package instructions, we just need to create the language folder and this package will create translation files in the folder.
I used this command:
npx json-autotranslate -i public/locales -m i18next -c gcloud_sa.json -d
error log:
💬 Translating strings from en to de...
├── Translating common.json (0 changes from cache)
An error has occurred:
Cannot read properties of undefined (reading 'name')
TypeError: Cannot read properties of undefined (reading 'name')
at /Users/captain/Desktop/saiberio/repos/saiberio/node_modules/json-autotranslate/lib/index.js:390:141
at step (/Users/captain/Desktop/saiberio/repos/saiberio/node_modules/json-autotranslate/lib/index.js:68:23)
at Object.next (/Users/captain/Desktop/saiberio/repos/saiberio/node_modules/json-autotranslate/lib/index.js:49:53)
at fulfilled (/Users/captain/Desktop/saiberio/repos/saiberio/node_modules/json-autotranslate/lib/index.js:40:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
If I create the placeholder JSON files inside the language folder, with an empty JSON ({}), it creates the translations successfully.
Any ideas why I see this behavior?