I am using requirejs-backbone to display list of users:However I'm getting this "Uncaught Object" error when i load the page. I debugged it and saw its my main.js that is causing the trouble. Below is my main.js.
require.config({
baseUrl: 'scripts/modules/sub-accounts/',
paths: {
'underscore': '../../libs/underscore',
'backbone': '../../libs/backbone',
'views': 'views',
'collections': 'collections',
'models': 'models',
'templates': 'templates'
},
shim: {
'underscore': {
exports: '_'
},
'backbone': {
deps: ['jquery', "underscore"],
exports: "Backbone"
},
'bootstrap': {
deps: ['jquery']
}
}
});
require([
'jquery',
'underscore',
'backbone',
'router'
], function ($, _, backbone, router){
SubAccountRouter.initialize();
});
EDIT:::
This is the place(init.js file) where im initializing all my scripts, apps and other libraries apart from the config in main.js. I'm not sure is that might be causing the issue:
script : [
'/scripts/libs/require/require.js',
'/scripts/libs/require/text.js',
'/scripts/libs/underscore.js',
'/scripts/libs/backbone.js',
'/scripts/modules/sub-accounts/main.js',
'/scripts/modules/sub-accounts/router.js'
]
Any ideas as to where i might be going wrong??
main.js
that’s the problem? On which line does the error happen? – Buck Doyle May 23 at 23:50config
and build it up step by step? – Buck Doyle May 24 at 1:07