title: Requiring external JavaScript file
body: <p>After reading all the relevant answers in SO and posts in the Appcelerator forums I still can't get this to work:</p>
  
  <p>I have an application developed in Appcelerator, and I want to load an <a href="https://github.com/hglattergotz/indicatordemo/blob/master/Resources/lib/IndicatorWindow.js" rel="nofollow">external JavaScript file</a> in some of my controllers.</p>
  
  <p>My App structure is as follows:</p>
  
  <pre><code>+ app
      - assets
      - controllers
      - models
      + lib
          - IndicatorWindow.js
      ...
  </code></pre>
  
  <p>Inside a controller I have the following code:</p>
  
  <pre><code>var uie = require('lib/IndicatorWindow');
  </code></pre>
  
  <p>But when I run this on an Android phone I get:</p>
  
  <blockquote>
    <p><strong>Uncaught Error:</strong> Requested module not found: lib/IndicatorWindow</p>
  </blockquote>
  
  <p>I have also tried placing the <code>lib</code> folder outside of <code>app</code>, and using other paths such as <code>/lib/IndicatorWindow</code> and <code>app/lib/IndicatorWindow</code>.</p>
  
  <p>I even tried using <code>Ti.include()</code> instead, with the same result. But I would rather use <code>require()</code> since I prefer using CommonJS modules.</p>