title: Module not found: Error: Can't resolve 'rxjs/add/observable/throw'
body: <p>I have the following imports in my "<strong>posts.service.ts</strong>"</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { HttpClient } from '@angular/common/http';
  import { NotFoundError } from '../commons/errors/not-found-error.errors';
  import { AppErrors } from '../commons/errors/app-errors.errors';
  import { Observable } from 'rxjs';
  import { catchError } from 'rxjs/operators';
  import 'rxjs/add/observable/throw';
  </code></pre>
  
  <p>I even checked the <strong>node_modules</strong> folder for 'rxjs/add/observable/throw' and it is available there. But I get a strange error as shown below during project compilation phase.</p>
  
  <p><strong>ERROR in ./src/app/services/posts.service.ts
  Module not found: Error: Can't resolve 'rxjs/add/observable/throw' in '/Users/gauthampughaz/Development/angular/practice/src/app/services'</strong></p>
  
  <p><strong>ℹ ｢wdm｣: Failed to compile.</strong></p>