transloco: [Bug]: ng add throws error: Cannot read property 'forEach' of undefined

I’m submitting a…


[x ] Bug report

Current behavior

simple installation process with ng add throws exception Cannot read property 'forEach' of undefined after choosing fr, en, ar as for locales. choosing webpack as loader. choosing json as file type. chhosing default files directory /src/asstests/i18n i tried creating the folder i18n under src/asstets before hand but still the error persists.

Expected behavior

installation finishes as expected.

What is the motivation / use case for changing the behavior?

i am following your installation guidelines and steps.

Environment


Angular version: 8
OS:Wind 10
editor VSCode

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

sure, the problem was in cases of "import * as... " or β€œimport defaultVar from...” on app.module.ts file. in those cases, one of the ast functions that should add import names to this was failing.

Much appreciated πŸ™πŸ™πŸ™

@inorganik Thanks for the example, I will check it out later today πŸ˜ƒ

@inorganik thanks! We reproduce it with your repo. @itayod will check it out.

@nartc for the time being, you can reproduce the installation process manually by fallowing this https://github.com/ngneat/transloco#installation it worked for me, it’s unfortunately though, this is a nice tool