Open AddisonG opened 5 years ago
That first error seems like it might be app related code. Not sure where we are using import
in translation-transform.js
@AddisonG did you figure out how to deal with this error eventually?
@rreckonerr - No, sorry. If I recall correctly, a few of us at work dug down into the code, and found what appeared to be the root cause, but decided against attempting to fix it, since it wasn't worth the effort.
Took another look at this @rreckonerr and @snewcomer. The problem seems to be that we were importing other generated json files into translations.js
, like so:
import external_import from './example';
export default {
"first": {
"key": "value"
},
"second": external_import
}
This caused it to fail on this line:
let obj = new Function(content.replace('export default', 'return'))();
The workaround is to manually resolve all the imports, by pasting the contents into the translations.js
file, so that it has no import statements or code other than the export default
line.
It would be nice to have this work for when multiple files are used, but that's a feature more than a bugfix.
After installing the module with
sudo npm install ember-i18n-intl-migrator -g
, I get the following error when running it (no args):I tried changing directories, from the base ember folder, but just got:
Which makes sense. Thus, I must be in the correct directory, but something else is going wrong. This also happens when I install the module as a local user, along
ember-i18n
(not globally), and run it from the node_modules folder.Node Version: v13.0.1 Operating System: Ubuntu 18.04.3 LTS