Mismatched anonymous define() module IE8

Thomas Pons

I've got a bug with requireJS and ie8 :

Mismatched anonymous define() module

This error appears only in IE8.

I know the origin :

I'm usign es5shim and json3 library added by an HTML comment like that :

<!--[if lt IE 9]>
  <script src="bower_components/es5-shim/es5-shim.js"></script>
  <script src="bower_components/json3/lib/json3.min.js"></script>
<![endif]-->

In fact it seems that es5shim and json3 use a define() function. This is the origin of the error.

I can solve it removing the HTML comment and loading these librairies like other in requirejs.

But i wan't these librairies only for IE8 !

I don't know what to do !!

Thx guys

Thomas Pons

I've found the solution. In fact es5shim and json3 use the define() function for AMD compatibility.

But i have to load them out of requirejs via an HTML comment :

  <!--[if lt IE 9]>
  <script src="bower_components/es5-shim/es5-shim.js"></script>
  <script src="bower_components/json3/lib/json3.min.js"></script>
  <![endif]-->

The matter was i add this comment after the data-main :

  <!-- build:js scripts/amd-app.js -->
  <script src="bower_components/requirejs/require.js" data-main="/scripts/main" </script>
  <!-- endbuild -->

 <!--[if lt IE 9]>
 <script src="bower_components/es5-shim/es5-shim.js"></script>
 <script src="bower_components/json3/lib/json3.min.js"></script>
 <![endif]-->

So it fails. If i put the comment before the data-main it works :

 <!--[if lt IE 9]>
 <script src="bower_components/es5-shim/es5-shim.js"></script>
 <script src="bower_components/json3/lib/json3.min.js"></script>
 <![endif]-->

 <!-- build:js scripts/amd-app.js -->
 <script src="bower_components/requirejs/require.js" data-main="/scripts/main" </script>
 <!-- endbuild -->

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Mismatched anonymous define() module IE8

From Dev

NG-TABLE - mismatched anonymous define() module

From Dev

mismatched anonymous define() module typescript with AMD and export module

From Dev

Uncaught Error: Mismatched anonymous define() module: function definition(name, global)

From Dev

loading Ace causes Uncaught Error: Mismatched anonymous define() module:

From Dev

Uncaught Error: Mismatched anonymous define() module: function definition(name, global)

From Dev

Brunch, RequireJS, and ReactJS is giving me "Error: Mismatched anonymous define() module"

From Dev

Filesaver and requireJS : Mismatched anonymous define

From Dev

Backbone.js and Require.js: Mismatched anonymous define() module: function (_, Backbone) {

From Dev

Getting "Mismatched anonymous define() module..." when I try running tests

From Dev

Getting "Mismatched anonymous define() module..." when I try running tests

From Dev

Why does this cause "Mismatched anonymous define()" in requireJS?

From Dev

"Error: Mismatched anonymous define()" with Karma + RequireJS + Jasmine

From Dev

Mismatched anonymous define() modules when loading external scripts

From Dev

How to declare dependencies inside an amd compatability check without creating 404/mismatched anonymous module during builds?

From Dev

Requirejs with Knockout error: Unable to process binding "component: function (){return f}" - Mismatched anonymous defined() module

From Dev

How to declare dependencies inside an amd compatability check without creating 404/mismatched anonymous module during builds?

From Dev

Requirejs with Knockout error: Unable to process binding "component: function (){return f}" - Mismatched anonymous defined() module

From Dev

Anonymous define() module in library's dependencies causes breakage for library's dependents

From Dev

Passing arguments to anonymous function of module

From Dev

Ionic angular service --> Regular module to anonymous module

From Dev

Ionic angular service --> Regular module to anonymous module

From Dev

jQuery not define in bootstrap module

From Dev

Scala: How to define anonymous function with implicit parameter?

From Dev

How to define embedded /anonymous fields (go struct )

From Dev

What are the rules to govern underscore to define anonymous function?

From Dev

Define static anonymous enum outside the class

From Dev

Is it possible to define an anonymous member function in C++

From Dev

Define static anonymous enum outside the class

Related Related

  1. 1

    Mismatched anonymous define() module IE8

  2. 2

    NG-TABLE - mismatched anonymous define() module

  3. 3

    mismatched anonymous define() module typescript with AMD and export module

  4. 4

    Uncaught Error: Mismatched anonymous define() module: function definition(name, global)

  5. 5

    loading Ace causes Uncaught Error: Mismatched anonymous define() module:

  6. 6

    Uncaught Error: Mismatched anonymous define() module: function definition(name, global)

  7. 7

    Brunch, RequireJS, and ReactJS is giving me "Error: Mismatched anonymous define() module"

  8. 8

    Filesaver and requireJS : Mismatched anonymous define

  9. 9

    Backbone.js and Require.js: Mismatched anonymous define() module: function (_, Backbone) {

  10. 10

    Getting "Mismatched anonymous define() module..." when I try running tests

  11. 11

    Getting "Mismatched anonymous define() module..." when I try running tests

  12. 12

    Why does this cause "Mismatched anonymous define()" in requireJS?

  13. 13

    "Error: Mismatched anonymous define()" with Karma + RequireJS + Jasmine

  14. 14

    Mismatched anonymous define() modules when loading external scripts

  15. 15

    How to declare dependencies inside an amd compatability check without creating 404/mismatched anonymous module during builds?

  16. 16

    Requirejs with Knockout error: Unable to process binding "component: function (){return f}" - Mismatched anonymous defined() module

  17. 17

    How to declare dependencies inside an amd compatability check without creating 404/mismatched anonymous module during builds?

  18. 18

    Requirejs with Knockout error: Unable to process binding "component: function (){return f}" - Mismatched anonymous defined() module

  19. 19

    Anonymous define() module in library's dependencies causes breakage for library's dependents

  20. 20

    Passing arguments to anonymous function of module

  21. 21

    Ionic angular service --> Regular module to anonymous module

  22. 22

    Ionic angular service --> Regular module to anonymous module

  23. 23

    jQuery not define in bootstrap module

  24. 24

    Scala: How to define anonymous function with implicit parameter?

  25. 25

    How to define embedded /anonymous fields (go struct )

  26. 26

    What are the rules to govern underscore to define anonymous function?

  27. 27

    Define static anonymous enum outside the class

  28. 28

    Is it possible to define an anonymous member function in C++

  29. 29

    Define static anonymous enum outside the class

HotTag

Archive