title: DataTables with RequireJS
body: <p>I am trying to use plain and simple DataTables with RequireJS. But I can not figure out how to setup my main.js file. This is what I have:</p>
  
  <pre><code>require.config({
    paths: {
      modernizr: 'libs/custom.modernizr',
      jquery: '../components/jquery/jquery',
      datatables: '../components/datatables/media/src/DataTables'
  },
  </code></pre>
  
  <p>However as soon as add </p>
  
  <pre><code>require(["datatables"]), function (whatever) {... });
  </code></pre>
  
  <p>I always receive this error:</p>
  
  <pre><code>Error: Module name "api.static.js" has not been loaded yet for context: _
  </code></pre>
  
  <p>I've tried using "shim" to make jquery a dependency of datatable but I get the same error. 
  Does anyone know how to setup a really simple datatable using requireJS?</p>
  
  <p>UPDATE:</p>
  
  <p>Here is the full main.js file:</p>
  
  <pre><code>require.config({
  paths: {
      jquery: '../components/jquery/jquery', 
      datatables: '../components/datatables/media/src/DataTables'
  },
  shim: {
        "datatables": ['jquery']
       }
  });
  
  require(["jquery", "datatables"], function () {
  
  $('#test').dataTable( {
      "aaData": [
          ['Trident', 'Internet Explorer 4.0', 'Win 95+', 4, 'X'],
          ['Trident', 'Internet Explorer 5.0', 'Win 95+', 5, 'C']
      ],
      "aoColumns": [
          { "sTitle": "Engine" },
          { "sTitle": "Browser" },
          { "sTitle": "Platform" },
          { "sTitle": "Version" },
          { "sTitle": "Grade" }
      ]
     });
  });
  </code></pre>
  
  <p>And here is the exact error message. I tried with multiple versions of Jquery and in multiple browsers and always receive this same message:
  <img src="https://i.stack.imgur.com/Gb01t.jpg" alt="Error Message I recieve"></p>
  
  <p>If it matters I built this main.js by using the zurb-foundation yo generator and then using</p>
  
  <pre><code>bower install --save jquery#1.11.0 
  bower install --save datatables 
  </code></pre>