I have this situation:
js/main.js
require.config({
'baseUrl' : 'js',
'waitSeconds' : 45,
'paths': {
"underscore": "libs/underscore-min",
"backbone": "libs/backbone-min",
"text" : "text"
},
'shim': {
backbone: {
'deps': ['jquery', 'underscore'],
'exports': 'Backbone'
},
underscore: {
'exports': '_'
}
},
'config': {
i18n: {
locale: localStorage.getItem('locale') || 'en-en'
}
}
});
require(['underscore', 'backbone', 'app'], function(_, Backbone, app) {
window.APP = window.APP || {};
app.init();
});
js/app.js
define(['jquery', 'routers/home'], function($, router) {
var init = function() {
APP.router = new router();
$("body").css({
overflow: 'hidden'
});
};
return {
init: init
};
});
I have this error – Cannot read property ‘normalize’ of undefined
On some module i use css plugin and i use text for template..
I miss something? What mean this error?
Thanks
Edit:
this is my Inspector log:
Uncaught TypeError: Cannot read property 'normalize' of undefined require-jquery.js:929
(anonymous function) require-jquery.js:929
(anonymous function) require-jquery.js:130
(anonymous function) require-jquery.js:1128
each require-jquery.js:58
Module.emit require-jquery.js:1127
Module.check require-jquery.js:899
Module.enable require-jquery.js:1115
Module.init require-jquery.js:758
callGetModule require-jquery.js:1142
context.completeLoad require-jquery.js:1493
context.onScriptLoad require-jquery.js:1620
You need to add jquery to your paths: