title: Cannot find module '../models/user' Node.js on Server
body: <p>i can start my node app fine on my local machine but if i then pull the project from github on my server and start it with <code>npm start</code> i get this error:</p>
  
  <blockquote>
    <p>Cannot find module '../models/user'.</p>
    
    <blockquote>
      <p>import User = require('../models/user');</p>
    </blockquote>
  </blockquote>
  
  <p><strong>registrationController.ts</strong> is trying to access the <strong>models/user</strong>.</p>
  
  <p>This is how i import in that file:</p>
  
  <pre><code>import User = require('../models/user');
  </code></pre>
  
  <p>This is my folder structure. I get the error in the highlighted file:</p>
  
  <p><a href="https://i.stack.imgur.com/zjS3U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zjS3U.png" alt="enter image description here"></a></p>
  
  <p>This is my <code>npm start</code> script:</p>
  
  <pre class="lang-js prettyprint-override"><code>"scripts": {
     "start": "nodemon --watch '*.ts' --exec 'ts-node' app.ts"
  }
  </code></pre>