thanks @xlp, this is the only solution that worked.
The worst documentation ever did it again. Everything datatables related is always a huge fight, especially since the documentation is always incorrect.
For a totally clean application this worked:
global.$ = global.jQuery = require('jquery');
var dt = require( 'datatables.net' );
Answers
Could you show me the page that has that please? As you say, that is wrong and it needs to be fixed.
Thanks,
Allan
This has been opened since 2017 and still no answer for this. I'm getting same error using the NPM package and requiring....
I managed to resolve this error in this way. If it is useful for someone.
This is my solution
thanks @xlp, this is the only solution that worked.
The worst documentation ever did it again. Everything datatables related is always a huge fight, especially since the documentation is always incorrect.
For a totally clean application this worked:
global.$ = global.jQuery = require('jquery');
var dt = require( 'datatables.net' );
Please provide examples of incorrect documentation.