ng-toolkit
ng-toolkit copied to clipboard
Cannot determine the module for class "xComponent". Add to NgModule to fix it.
Hi, i'm trying to build my project with "npm run build:ssr" but this error comes up: ERROR in : Cannot determine the module for class xComponent. Add xComponent to the NgModule to fix it. I'm currently using lazy loading module:
const routes: Routes = [ { path: 'public', loadChildren: './public/public.module#PublicModule' }, { path: 'private', loadChildren: './private/private.module#PrivateModule', canActivate: [AuthGuard] }];
Angular version: 7
It seems that while building (first build), the chunks of all modules are created, but at the second build, this error appears. Anyone having this error?