I try to build project with Angular CLI ng build --prod and I get this error:
ERROR in TypeError: Cannot read property \'kind\' of undefi
This problem occurs by so many cases, one of the major reasons is installed version of @angular/cli is different to globally installed version of @angular/cli Make sure that both are same version. In other cases you have to update the devkit.
Please have a look on these threads, you will get an idea: