title: RequireJs dependency always undefined
body: <p>I am using require Js and am getting rather confused as to why my modules are loading but dependencies are always undefined and even upon using require.defined() function to check if my module has been loaded it indeed has been but when I use the require([deps], function(deps){}); all of my dependencies are undefined (except for jquery, underscore and knockout)</p>
  
  <p>my file structure is as follows
    my file structure is as follows</p>
  
  <pre><code>scripts 
      |
      |        
      main.js
      |
      |_________BusinessScripts
      |           |
      |           |
      jquery.js   |
      |           |
      |           boostrapper.js-undefined
      ko.js       |
                  |
                  dataservice.js-undefined
  </code></pre>
  
  <p>here is an example of my main file that kicks off require </p>
  
  <pre><code>requirejs.config(
      {
          paths: {
              'jquery': 'jquery-1.7.1',
              'underscore': 'underscore',
              'ko': 'knockout-2.2.1'
          },
          shim: {
              underscore: { exports: '_' },
          }
      }
  );
  
  
  requirejs(['require', 'BusinessScripts/bootstrapper', 'BusinessScripts/dataservice'],
  function (require,bootstrapper, dataservice) {
  
      var def = require.defined('BusinessScripts/bootstrapper'); //this returns true
  
      if (dataservice !== undefined) { // always undefined
  
          alert("Loaded properly");
      } else {
          alert("not loaded!!!");
      }
  
      if (bootstrapper !== undefined) { // always undefined
  
  
          alert("Loaded properly");
      } else {
          alert("not loaded!!!");
      }
  
  });
  </code></pre>
  
  <p>my data service class does a quite lengthy jquery get but as a simple example my bootstrapper is doing next to nothing</p>
  
  <pre><code>//bootstrapper
  define(function () { var one = 1; 
  var run = function () {
  }
  });
  
  //dataservice
  
  define(['jquery', 'underscore'],function ($, _) {
      $.ajax({lengthy work...});
  
  });
  </code></pre>
  
  <p>as I said both modules are being loaded but are never resolving </p>
  
  <p>any help would be much appreciated.</p>