title: Angular 6: Module not found error regarding RxJs
body: <p><strong>I am using</strong> </p>
  
  <ul>
  <li>Angular CLI: 6.0.5 </li>
  <li>Node: 8.11.1 </li>
  <li>Angular: 6.0.3</li>
  <li>rxjs: 6.2.0</li>
  </ul>
  
  <p>when Compiling the Angular 6 app I got errors, below is just the first one</p>
  
  <pre><code>ERROR in ./src/app/web.service.ts
  Module not found: Error: Can't resolve 'rxjs/add/operator/toPromise' in 
  'C:\Node\ang\frontend\src\app'
  </code></pre>
  
  <p>My <strong>web.service.ts</strong> code</p>
  
  <pre><code>import { Http, Headers, Response } from '@angular/http';
  import 'rxjs/add/operator/toPromise';
  
  export class WebService{
      constructor(private http:Http){
  
      }
      getMessages(){
          return this.http.get("http://localhost:2000/messages").toPromise(); 
      }
  } 
  </code></pre>
  
  <p>My <strong>app.module.ts</strong> code</p>
  
  <pre><code>import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  import {NoopAnimationsModule} from '@angular/platform-browser/animations';
  import {MatButtonModule,
    MatCardModule,
    MatSnackBarModule,
    MatToolbarModule,
    MatInputModule} from '@angular/material';
  
  import { AppComponent } from './app.component';
  import { WebService } from './web.service';
  import { MessagesComponent } from './messages.component';
  import {HttpModule} from '@angular/http';
  
  @NgModule({
    declarations: [
      AppComponent,  MessagesComponent
    ],
    imports: [
      BrowserModule, HttpModule, NoopAnimationsModule, MatButtonModule, MatCardModule, MatSnackBarModule, MatToolbarModule, MatInputModule
    ],
    providers: [WebService],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>
  
  <p>I am learning Angular from Lynda.com video tutorial. I follow each and every step. but I got the error.</p>