title: Getting error Cannot find module 'app/dashboard/first/first.module'
body: <p>I am getting a weird error. I am developing angular 4 based project. 
  Following in my code structure</p>
  
  <ul>
  <li>app</li>
  <li>app.component.html</li>
  <li>app.component.ts</li>
  <li>app.module.ts</li>
  <li>app.routing.module.ts
  
  <ul>
  <li>dashboard</li>
  <li>dashboard.component.html</li>
  <li>dashboard.component.ts</li>
  <li>dashboard.module.ts</li>
  <li>dashboard.routing.module.ts
  
  <ul>
  <li>first</li>
  <li>first.component.html</li>
  <li>first.component.ts</li>
  <li>first.module.ts</li>
  <li>first.routing.module.ts</li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>When I try to load first from dashboard, I get following error.</p>
  
  <pre><code>    ERROR Error: Uncaught (in promise): Error: Cannot find module 'app/dashboard/first/first.module'.
  Error: Cannot find module 'app/dashboard/first/first.module'.
      at webpackAsyncContext (src async:14)
      at SystemJsNgModuleLoader.webpackJsonp.../../../core/@angular/core.es5.js.SystemJsNgModuleLoader.loadAndCompile (core.es5.js:5644)
      at SystemJsNgModuleLoader.webpackJsonp.../../../core/@angular/core.es5.js.SystemJsNgModuleLoader.load (core.es5.js:5632)
      at RouterConfigLoader.webpackJsonp.../../../router/@angular/router.es5.js.RouterConfigLoader.loadModuleFactory (router.es5.js:3417)
      at RouterConfigLoader.webpackJsonp.../../../router/@angular/router.es5.js.RouterConfigLoader.load (router.es5.js:3401)
      at MergeMapSubscriber.project (router.es5.js:1569)
  </code></pre>
  
  <p>Following is my app.routing.module code</p>
  
  <pre><code>import { NgModule } from '@angular/core';
  import { Routes, RouterModule } from '@angular/router';
  
  const routes: Routes = [
       { path: '', loadChildren: 'app/login/login.module' },
      { path: 'dashboard', loadChildren: 'app/dashboard/dashboard.module' },
  
  ];
  
  @NgModule({
      imports: [RouterModule.forRoot(routes)],
      exports: [RouterModule]
  })
  export class AppRoutingModule { }
  </code></pre>
  
  <p>At compile time there is no error. However when I add a space in dashboard.routing.module.ts and save the file, the error goes away and the routing works perfectly. It runs smoothly till I restart node server.</p>