title: Unable to redirect to Lazy Loaded module as default route/url on server start up
body: <p>Good day folks,</p>
  
  <p>I am having this issue in my Angular 2 application upon server startup (<code>npm start</code>). </p>
  
  <p>I redirect the base route or base path to <code>user/login</code> which is a Lazy Loaded module but it throws an <code>Cannot find module</code> error. This always happens as I've said, during startup and editing the <code>pathMatch</code> argument from <code>'full'</code> to <code>'prefix'</code> and vice versa fixes the error and loads the route without error. </p>
  
  <p>I hope you can help me with this.</p>
  
  <p>Below is the program.</p>
  
  <p><strong>app/routes.ts</strong></p>
  
  <pre><code>import { Routes } from '@angular/router';
  import { AppComponent } from './app.component';
  
  export const appRoutes:Routes = [
      { path: 'user', loadChildren:  'user/user.module#UserModule'},  
      { path: '', redirectTo: 'user/login', pathMatch: 'full'}
  ]
  </code></pre>
  
  <p><strong>app/app.module.ts</strong></p>
  
  <pre><code>import { NgModule } from '@angular/core';
  import { BrowserModule } from '@angular/platform-browser';
  import { RouterModule, Routes } from '@angular/router';
  
  import { AppComponent } from './app.component';
  import { appRoutes } from './routes';
  
  @NgModule({
  declarations: [
      AppComponent
  ],
  imports: [
      BrowserModule,
      RouterModule.forRoot(appRoutes)
  ],
  providers: [],
  bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>
  
  <p><strong>app/user/user.routes.ts</strong></p>
  
  <pre><code>import { LoginComponent } from "./login.component";
  
  export const userRoutes = [
      { path: 'login', component: LoginComponent }
  ]
  </code></pre>
  
  <p><strong>app/user/user.module.ts</strong></p>
  
  <pre><code>import { NgModule } from "@angular/core";
  import { CommonModule } from "@angular/common";
  import { RouterModule } from "@angular/router";
  
  import { userRoutes } from "./user.routes";
  import { LoginComponent } from "./login.component";
  
  
  @NgModule({
  imports: [
      CommonModule,
      RouterModule.forChild(userRoutes)
  ],
  declarations: [
      LoginComponent
  ],
  providers: [UserAuthService]
  })
  
  export class UserModule {}
  </code></pre>
  
  <p>I hope I've provided enough information about my problem. If not, just let me know. Thank you.</p>
  
  <p>EDIT:</p>
  
  <p>I'm having the same error when I visit <code>user/login</code> upon startup.</p>