ng-toolkit icon indicating copy to clipboard operation
ng-toolkit copied to clipboard

Cannot determine the module for class "xComponent". Add to NgModule to fix it.

Open brunomleonardo opened this issue 4 years ago • 0 comments

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?

brunomleonardo avatar Mar 16 '20 14:03 brunomleonardo