title: Uncaught Error: Mismatched anonymous define() module: function definition(name, global)
body: <p>I got this error while loading the requirejs file for the backbone. I tried loading the r.js, the requirejs optimizer, but I'm still stuck with it.</p>
  
  <pre><code>Uncaught Error: Mismatched anonymous define() module: function definition(name, global){
  
  "use strict";
  
  var PubSub = {
          name: 'PubSubJS',
          version: '1.3.1-dev'
  </code></pre>
  
  <p>Following is my js:</p>
  
  <pre><code>define([
  'jquery',
  'underscore',
  'backbone'
  ],function(){
  subAccountRouter = Backbone.Router.extend({
    routes: {
    // Defining the routes
      'sub-accounts': 'subAccountList',
      '*actions': 'defaultAction'
    },
  });
  </code></pre>
  
  <p>Seems there have been some changes made to requirejs define() call function, somehow cant figure it out. Does anyone have ideas??</p>
  
  <p>EDIT:::</p>
  
  <p>Below is the router.js file.</p>
  
  <pre><code>    define([
         'jquery',
         'underscore',
         'backbone'
        ],function($, _, Backbone){
            SubAccountRouter = Backbone.Router.extend({
                routes: {
                 'sub-accounts': 'subAccountList',
                 '*actions': 'defaultAction'
                },
  
  
             initialize: function () {
                this.appContainer = $("#subaccount");
      //collections and models
                this.subAccountCollection = null;
              this.subAccountModel = null;
            },
  
        subAccountList: function(){
          var self = this;
          },
       defaultAction: function(){
          this.subAccountList();
        },
        });
  
      return {
         initialize: function() {
             Backbone.history.start();
  
            }
          };
       }); //main func
  </code></pre>
  
  <p>What im i doing wrong here??
  I check al my paths and they seem to be correct, i still dont get why this issue is still bugging me..:(
  I have tried changing the paths for the routes, and also passing arguments to the       <code>function($, _, Backbone)</code>(as shown below in 1 of the sol'n). However i still seem to see the error. Does any one have any other ideas???</p>