title: Ionic: Error: Module build failed: Error: ENOENT: no such file or directory
body: <p>I am using Ionic, and get the following error:</p>
  
  <blockquote>
    <p>Runtime Error Uncaught (in promise): Error: Module build failed:
    Error: ENOENT: no such file or directory, open
    '/Users/richardmarais/Development/ionic/theWhoZoo/src/pages/model/ratingModel.js'</p>
  </blockquote>
  
  <p>The error is a result of this line of code:</p>
  
  <pre><code>this.ratingModel = new RatingModel();
  </code></pre>
  
  <p>When I remove this line, I don't get the error.</p>
  
  <p><strong>ratingModel.ts</strong></p>
  
  <pre><code>import { Injectable } from "@angular/core";
  import { PersonModel } from './personModel';
  import { JobModel } from './jobModel';
  
  @Injectable()
  export class RatingModel {
          public id: number = null;
          public job: JobModel = null;
          public review: string = null;
          public rating: number = null;
          public reviewDate: number = null;
          public time: string = null;
          public person: PersonModel = null;
          public anonymous: number = null;
  
          constructor() {
  
          }
  }
  </code></pre>
  
  <p>Reading other forums, people are getting this error due to the case not matching in their imports, but I have checked mine, and they do match.</p>
  
  <pre><code>import { RatingModel } from '../model/ratingModel';
  </code></pre>
  
  <p>However, I have noticed something strange in my IDE (Visual Studio Code):</p>
  
  <p><a href="https://i.stack.imgur.com/TavQ9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TavQ9.png" alt="enter image description here"></a></p>
  
  <p>As you can see, in the search results, there are two files for the object, <code>ratingModel.ts</code> and <code>RatingModel.ts</code>.  But when I check the actual files system, there is only on file, <code>ratingModel.ts</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/ZfyxZ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ZfyxZ.png" alt="enter image description here"></a></p>
  
  <p><strong>Question</strong></p>
  
  <p>Does anyone know what and how to resolve what looks like possibly a bug or fault here?</p>
  
  <p>Thanks</p>
  
  <p><strong>More info:</strong></p>
  
  <pre><code>global packages:
  
      @ionic/cli-utils : 1.0.0
      Cordova CLI      : 6.4.0 
      Ionic CLI        : 3.0.0
  
  local packages:
  
      @ionic/app-scripts              : 1.3.0
      @ionic/cli-plugin-cordova       : 1.0.0
      @ionic/cli-plugin-ionic-angular : 1.0.0
      Ionic Framework                 : ionic-angular 3.2.1
  
  System:
  
      Node       : v7.10.0
      OS         : macOS Sierra
      Xcode      : Xcode 8.3.2 Build version 8E2002 
      ios-deploy : not installed
      ios-sim    : not installed
  </code></pre>