Me está dando este error en la consola al haber instalado con npm la librería "datatables".
Uncaught TypeError: Cannot read property 'classes' of undefined
at Object.o.2 (main.js? [sm]:2408)
at r (main.js? [sm]:1)
at main.js? [sm]:1
at Object.o.16.bootstrap/dist/js/bootstrap (main.js? [sm]:44254)
at r (main.js? [sm]:1)
at main.js? [sm]:1
at Object.o.17.../../node_modules/sweetalert/dist/sweetalert.min (main.js? [sm]:44352)
at r (main.js? [sm]:1)
at t (main.js? [sm]:1)
at main.js? [sm]:1
Estoy trabajando con gulp y browserify.
Archivo main.js donde junto todos los js
require('./BootstrapInit');
require('../../node_modules/sweetalert/dist/sweetalert.min');
require('./soporte');
Archivo BootstrapInit.js
window.jQuery = $ = require('jquery');
require( 'datatables.net-bs' )( window, window.jQuery );
require( 'datatables.net-autofill-bs' )( window, window.jQuery );
require( 'datatables.net-colreorder' )( window, window.jQuery );
require( 'datatables.net-fixedcolumns' )( window, window.jQuery );
require( 'datatables.net-fixedheader' )( window, window.jQuery );
require( 'datatables.net-keytable' )( window, window.jQuery );
require( 'datatables.net-responsive' )( window, window.jQuery );
require( 'datatables.net-rowgroup' )( window, window.jQuery );
require( 'datatables.net-rowreorder' )( window, window.jQuery );
require( 'datatables.net-scroller' )( window, window.jQuery );
require( 'datatables.net-select' )( window, window.jQuery );
var bootstrap = require('bootstrap/dist/js/bootstrap');
Código JavaScript en la página
$(document).ready(function(){
$("#mensajestable").dataTable({
"aoColumns":[
null,
null,
{"sType": "us_date"},
<CFIF val(rev) IS 4>
{"sType": "us_date"},
<CFELSE>
null,
</CFIF>
null,
null,
null,
null,
null
],
'aoColumns':[
{'sClass':'left','sWidth':'30px'},
{'sClass':'center','sWidth':'10px'},
{'sClass':'right','sWidth':'100px'},
{'sClass':'right','sWidth':'100px'},
{'sClass':'left'},
{'sClass':'center','sWidth':'10px'},
{'sClass':'left','sWidth':'200px'},
{'sClass':'left','sWidth':'90px'},
{'sClass':'left','sWidth':'370px'}
],
'order':[
[0,"desc"],
],
lengthMenu:[
[10, 25, 50, 200,-1],
['10','25','50','200','todas']
],
'pageLength':25,
'columnDefs':[
{'targets':1,'searchable':false,'orderable':false},
{'targets':2,'searchable':false,'orderable':false},
{'targets':3,'searchable':false,'orderable':false},
{'targets':5,'searchable':false,'orderable':false},
{'targets':8,'searchable':false,'orderable':false}
]
});
});