I am developing an application using lots of js libs and mainly using Express JS. The all code is working fine with Firefox and Chrome. but I am getting below errors in IE8 and IE9.
SCRIPT5022: fromText eval for hbs!notification/templates/dropDown failed: SyntaxError: Syntax error in regular expression
http://requirejs.org/docs/errors.html#fromtexteval
require.js, line 138 character 9
SCRIPT5022: fromText eval for hbs!notification/templates/dropDownItem failed: SyntaxError: Syntax error in regular expression
http://requirejs.org/docs/errors.html#fromtexteval
require.js, line 138 character 9
SCRIPT5022: fromText eval for hbs!layouts/admin/templates/teamManagement failed: SyntaxError: Syntax error in regular expression
http://requirejs.org/docs/errors.html#fromtexteval
require.js, line 138 character 9
SCRIPT5022: fromText eval for hbs!layouts/admin/alarms/templates/projectAlarms failed: SyntaxError: Syntax error in regular expression
http://requirejs.org/docs/errors.html#fromtexteval
require.js, line 138 character 9
SCRIPT5022: fromText eval for hbs!admin/templates/navigation failed: SyntaxError: Syntax error in regular expression
http://requirejs.org/docs/errors.html#fromtexteval
require.js, line 138 character 9
SCRIPT5022: fromText eval for hbs!layouts/admin/templates/base failed: SyntaxError: Syntax error in regular expression
http://requirejs.org/docs/errors.html#fromtexteval
require.js, line 138 character 9
These errors are only showing up in IE8 and IE9.
Here is my config.js
require.config({
paths: {
// Require plugins
'text': 'vendor/requirejs-text/text',
'css': 'vendor/css/css',
'hbs': 'vendor/require-handlebars-plugin/hbs',
'Handlebars': 'vendor/require-handlebars-plugin/Handlebars',
'i18nprecompile': 'vendor/require-handlebars-plugin/i18nprecompile',
'json2': 'vendor/require-handlebars-plugin/json2',
// Libraries
'es5shim': 'vendor/es5-shim/es5-shim',
'underscore': 'vendor/underscore/underscore',
'jquery': 'vendor/jquery/jquery',
'jquery.DatePicker': 'vendor/datepicker/datepicker',
'jquery.mousewheel': 'vendor/jquery-mousewheel/jquery.mousewheel',
'backbone': 'vendor/backbone/backbone',
'backbone.virtualCollection': 'vendor/backbone-virtual-collection/backbone.virtual-collection',
'backbone.marionette': 'vendor/backbone.marionette/backbone.marionette',
'backbone.marionette.handlebars': 'vendor/backbone.marionette.handlebars/backbone.marionette.handlebars',
'leaflet': 'vendor/leaflet/leaflet-src',
'highcharts': 'vendor/highcharts/highcharts.src',
'paper': 'vendor/paper/paper',
'handsontable': 'vendor/handsontable/jquery.handsontable',
'walltime': 'vendor/walltime-js/walltime',
'walltime-data': 'vendor/walltime-js/walltime-data'
},
shim: {
'underscore': {
exports: '_'
},
'jquery.DatePicker': {
deps: ['jquery']
},
'backbone': {
deps: ['underscore', 'jquery'],
exports: 'Backbone'
},
'backbone.marionette': {
deps: ['backbone'],
exports: 'Marionette'
},
'backbone.virtualCollection': {
deps: ['backbone', 'underscore']
},
'leaflet': {
exports: 'L'
},
'highcharts': {
deps: ['jquery'],
exports: 'Highcharts'
},
'walltime': {
deps: ['walltime-data']
}
},
hbs: {
i18nDirectory: 'i18n/',
disableI18n: false, // This disables the i18n helper and
// doesn't require the json i18n files (e.g. en_us.json)
// (false by default)
disableHelpers: true, // When true, won't look for and try to automatically load
// helpers (false by default)
helperPathCallback: // Callback to determine the path to look for helpers
function (name) { // ('/template/helpers/'+name by default)
return 'cs!' + name;
},
compileOptions: {} // options object which is passed to Handlebars compiler
}
});
Please help me guys!
----- Update -----
I posted this as issue on Github for requirejs repo.
You can find it here
According to comment it seems like problem is with eval in IE9.
I also tried to put eval("("+text+")")
as mentioned here but still not worked.
Can anyone please tell how I get this eval thing to work in IE9.
Thanks