title: Failed to list lazy routes: Unknown module AppModule after Angular update
body: <p>I'm not specifing lazy routing on app.module anywhere, but it throws me this error and fails to compile:</p>
  
  <pre><code>ERROR in Failed to list lazy routes: Unknown module '/Users/heikopiirme/Documents/realNewClient/client/src/app/app.module#AppModule'.
  </code></pre>
  
  <p>The only place I'm using lay loading is here:</p>
  
  <pre><code>{
      path: 'logistics',
      loadChildren: () =&gt; import('./views/logistics/logistics.module').then(m =&gt; m.LogisticsModule),
      canActivate: [ AuthGuard, NgxPermissionsGuard ],
      data: {
        permissions: {
          only: [Role.logistics_manager],
          redirectTo: '/home'
        }
      }
    }
  </code></pre>
  
  <p>This gave me an error but after switching to the new syntax it's fixed. How am I supposed to fix this for AppModule?</p>