TypeError: $.fn.dataTable is undefined in datetime.js line 96
TypeError: $.fn.dataTable is undefined in datetime.js line 96

Hi,
I have a laravel 6 project, I installed datatables.net, datatables.net-bs4 and datatables.net-plugins via npm.
I have added to app.js
require('datatables.net');
require('datatables.net-bs4');
and added to webpack.mix.js
.js('node_modules/datatables.net-bs4/js/dataTables.bootstrap4.js', 'public/js')
.js('node_modules/datatables.net-plugins/dataRender/datetime.js', 'public/js')
but I keep getting the error.
Can somebody tell me what's wrong?
This discussion has been closed.
Answers
Could you give me a link to the resulting page or a repo that demonstrates the issue please? It might be that you need to use
require('datatables.net')()
- see the documentation here.Allan