EXCEPTION: Uncaught (in promise): Error: Cannot find module ‘app/home/home.module’

For Angular 8 and 9, the lazy load declaration changed.
Since Angular 8 introduced the new recommended module loading method, previously the default method of lazy loading modules was to specify a string path to a module:

{ path: 'auth', loadChildren: 'src/app/auth/auth.module#AuthModule' }

The method of importing modules has changed to dynamic import. The dynamic import is promise-based and gives you access to the module, where the module’s class can be called. Thus your import should now be changed to:

  { path: 'auth', loadChildren: () => import('src/app/auth/auth.module').then(m => m.AuthModule) }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)