javascript - Uncaught Error: Mismatched anonymous define() module -


i'm masochist, decided change way in load require.js in project. did go (using modernizr.load)...

<script type="text/javascript">      function requirejsconfig () {         requirejs.config({             'baseurl': '{{ static_url }}js',             'paths': {                 'jquery': 'libraries/jquery',                 'backbone': 'libraries/backbone',                 'underscore': 'libraries/underscore',                 'jquery.cookie': 'libraries/jquery-cookie',                 'tinymce': 'tinymce/tinymce.min',                 'react' : 'libraries/react',                 'history': 'history'             },             waitseconds: 30,             shim: {                 'jquery' : 'jquery',                 'underscore' : {                     exports: '_'                 },                 'backbone': {                     deps: ['underscore', 'jquery'],                     exports: 'backbone'                 },                 'jquery.cookie': {                     deps: ['jquery'],                     exports: '$.cookie'                 },                 'tinymce': {                     deps: ['jquery'],                     exports: 'tinymce'                 }             }         });          define('static_url', [], "{{ static_url }}");         window.static_url = "{{ static_url }}";         define('pubnub_subscribe_key', [], "{{ pubnub_subscribe_key }}");          require(["teacher"]);     };      modernizr.load({         load: '{{ static_url }}js/require.js',         complete: function() {             requirejsconfig();         }     });  </script> 

...to (not using modernizr.load)...

<script type="text/javascript" src="{{ static_url }}js/require.js"></script>  <script type="text/javascript">      function requirejsconfig () {         requirejs.config({             'baseurl': '{{ static_url }}js',             'paths': {                 'jquery': 'libraries/jquery',                 'backbone': 'libraries/backbone',                 'underscore': 'libraries/underscore',                 'jquery.cookie': 'libraries/jquery-cookie',                 'tinymce': 'tinymce/tinymce.min',                 'react' : 'libraries/react',                 'history': 'history'             },             waitseconds: 30,             shim: {                 'jquery' : 'jquery',                 'underscore' : {                     exports: '_'                 },                 'backbone': {                     deps: ['underscore', 'jquery'],                     exports: 'backbone'                 },                 'jquery.cookie': {                     deps: ['jquery'],                     exports: '$.cookie'                 },                 'tinymce': {                     deps: ['jquery'],                     exports: 'tinymce'                 }             }         });          define('static_url', [], "{{ static_url }}");         window.static_url = "{{ static_url }}";         define('pubnub_subscribe_key', [], "{{ pubnub_subscribe_key }}");          require(["teacher"]);     };      requirejsconfig();  </script> 

...and i'm getting this:

uncaught error: mismatched anonymous define() module: function (){return r}

fwiw, error happening (in require.js):

function intakedefines() {     var args;      //any defined modules in global queue, intake them now.     takeglobalqueue();      //make sure remaining defqueue items processed.     while (defqueue.length) {         args = defqueue.shift();         if (args[0] === null) {             return onerror(makeerror('mismatch', 'mismatched anonymous define() module: ' + args[args.length - 1]));         } else {           //args id, deps, factory. should normalized           //define() function.           callgetmodule(args);         }     } } 

and way, i've verified none of these apply.

why did seemingly innocuous change cause nuclear bomb explode in project? (yes, actual nuclear bomb detonated...as if millions of voices cried out in terror, , silenced...)

you said "none of these apply", unless hand modified underscore, certainly does.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -