title: Trouble combining Require.js and Backbone.js/Underscore.js
body: <p>I've read previous threads where other members have had identical error messages as me, but their accepted solution doesn't seem to help.</p>
  
  <p>Basically I get this in Chrome console when I try to load index.html:</p>
  
  <pre><code>Uncaught Error: Module name "underscore" has not been loaded yet for context: _. Use require([])
  </code></pre>
  
  <p>A couple of seconds later this shows up:</p>
  
  <pre><code>Uncaught Error: Load timeout for modules: underscore,backbone
  </code></pre>
  
  <p>Chrome network tools doesn't show any anomalies everything up until day_view.js is loaded fine (200 OK).</p>
  
  <p><strong>File structure</strong></p>
  
  <p><img src="https://i.stack.imgur.com/nC4H8.png" alt="enter image description here"></p>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>...
  &lt;script&gt;
          var require = {
              deps: ["jquery/jquery-min", "underscore/underscore-min", "backbone/backbone-min"]
          };
  &lt;/script&gt;
  &lt;script data-main="scripts/main" src="scripts/require.js"&gt;&lt;/script&gt;
  ...
  </code></pre>
  
  <p><strong>main.js</strong></p>
  
  <pre><code>require.config({
      baseUrl: 'scripts',
  
      paths:{
          jquery:'jquery/jquery-min',
          underscore:'underscore/underscore-min',
          backbone:'backbone/backbone-min'
      },
  
      shim: {
          underscore: {
              exports: '_'
          },
          backbone: {
              deps: ["underscore/underscore-min", "jquery/jquery-min"],
              exports: "Backbone"
          }
      },
  
      waitSeconds: 200
  });
  
  require(['day_view'], function (day_view) {
      function start() {
          day_view.render();
      }
  
      return {
          start:start
      };
  });
  </code></pre>
  
  <p><strong>day_view.js</strong></p>
  
  <pre><code>define(['jquery', 'underscore', 'backbone'], function($, _, Backbone) {
      function render() {
          ...
      }
  ...
  </code></pre>