1
看到錯誤 - 我不確定究竟是什麼錯誤。頁面/模塊有時會加載,但很多時候我會收到此錯誤。這是最新的下劃線和主幹模塊。requirejs - 未加載下劃線模塊
Error: Module name 'underscore' has not been loaded yet for context: _ http://requirejs.org/docs/errors.html#notloaded
require.config({
"baseUrl": "js",
"paths": {
"jquery":"libs/jquery-1.8.2",
"underscore":"libs/underscore-min",
"backbone":"libs/backbone-min",
},
shim: {
'backbone': {
deps: ['underscore', 'jquery'],
exports: 'Backbone'
},
'underscore': {
exports: '_'
}
} // end Shim Configuration
});
require(['jquery', 'underscore','backbone'], function($, _, Backbone){
console.log('require init - ' + Backbone + ", " + _);
});
你是否在任何定義調用中使用它?錯誤提示'require'在某處不正確的使用 –
是的,我讀了err並檢查了一下,它不在定義調用中。 –