Cordova build ios TypeScript error (Lazy loading?)

Hello!

I want to build my app for iOS but I always get build errors. With Android everything works fine. It is not directly related to Chartist but to all components that have a componentname.module.ts file. Do you have any tips how to resolve it?

For the other components the error message is the same: Please consider moving component.xyz to a higher
module that imports…

typescript error 
            Type ChartistComponent in 
            /abc/node_modules/ng-chartist/dist/chartist.component.d.ts is part of the 
            declarations of 2 modules: ComponentsModule in 
            /abc/src/components/components.module.ts and ChartistModule in 
            /abc/node_modules/ng-chartist/dist/chartist.component.d.ts! Please consider 
            moving ChartistComponent in 
            /abc/node_modules/ng-chartist/dist/chartist.component.d.ts to a higher 
            module that imports ComponentsModule in 
           /abc/src/components/components.module.ts and ChartistModule in 
            /abc/node_modules/ng-chartist/dist/chartist.component.d.ts. You can also 
            create a new NgModule that exports and includes ChartistComponent in 
            /abc/node_modules/ng-chartist/dist/chartist.component.d.ts then import that 
            NgModule in ComponentsModule in /Users/chris/pgm/appm2g/m2g-frontend/src/components/components.module.ts and 
            ChartistModule in 
            /abc/node_modules/ng-chartist/dist/chartist.component.d.ts. 

Error: The Angular AoT build failed. See the issues above
1 Like

Same issue here, how did you solved?