Uncaught Reference error: jQuery is not definited..
Uncaught Reference error: jQuery is not definited..
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
I'm using nextJs with database tables and it is returning me with many errors.
I already have jQuery installed. I dont know how to fix these errors
Uncaught ReferenceError: jQuery is not defined
at cdn.datatables.net/1.10.19/js/jquery.dataTables.js:56:12
at cdn.datatables.net/1.10.19/js/jquery.dataTables.js:59:1
cdn.datatables.net/1…dataTables.min.js:5
Uncaught ReferenceError: jQuery is not defined
at cdn.datatables.net/1.10.18/js/jquery.dataTables.min.js:5:284
at cdn.datatables.net/1.10.18/js/jquery.dataTables.min.js:5:309
cdn.datatables.net/1…bootstrap4.min.js:5
Uncaught ReferenceError: jQuery is not defined
at cdn.datatables.net/1.10.18/js/dataTables.bootstrap4.min.js:5:285
at cdn.datatables.net/1.10.18/js/dataTables.bootstrap4.min.js:5:310
cdn.datatables.net/r…responsive.min.js:5
Uncaught ReferenceError: jQuery is not defined
at cdn.datatables.net/responsive/2.2.3/js/dataTables.responsive.min.js:5:285
at cdn.datatables.net/responsive/2.2.3/js/dataTables.responsive.min.js:5:310
cdn.datatables.net/r….bootstrap.min.js:5
Uncaught ReferenceError: jQuery is not defined
at cdn.datatables.net/responsive/2.2.3/js/responsive.bootstrap.min.js:5:388
at cdn.datatables.net/responsive/2.2.3/js/responsive.bootstrap.min.js:5:413
scripts.js:111 Uncaught TypeError: $(...).DataTable is not a function
at scripts.js:111:21
at scripts.js:235:3
Answers
I'm using nextJs with database tables and it is returning me with many errors.
I already have jQuery installed. I dont know how to fix these errors
Uncaught ReferenceError: jQuery is not defined
at cdn.datatables.net/1.10.19/js/jquery.dataTables.js:56:12
at cdn.datatables.net/1.10.19/js/jquery.dataTables.js:59:1
cdn.datatables.net/1…dataTables.min.js:5
Uncaught ReferenceError: jQuery is not defined
at cdn.datatables.net/1.10.18/js/jquery.dataTables.min.js:5:284
at cdn.datatables.net/1.10.18/js/jquery.dataTables.min.js:5:309
cdn.datatables.net/1…bootstrap4.min.js:5
Uncaught ReferenceError: jQuery is not defined
at cdn.datatables.net/1.10.18/js/dataTables.bootstrap4.min.js:5:285
at cdn.datatables.net/1.10.18/js/dataTables.bootstrap4.min.js:5:310
cdn.datatables.net/r…responsive.min.js:5
Uncaught ReferenceError: jQuery is not defined
at cdn.datatables.net/responsive/2.2.3/js/dataTables.responsive.min.js:5:285
at cdn.datatables.net/responsive/2.2.3/js/dataTables.responsive.min.js:5:310
cdn.datatables.net/r….bootstrap.min.js:5
Uncaught ReferenceError: jQuery is not defined
at cdn.datatables.net/responsive/2.2.3/js/responsive.bootstrap.min.js:5:388
at cdn.datatables.net/responsive/2.2.3/js/responsive.bootstrap.min.js:5:413
scripts.js:111 Uncaught TypeError: $(...).DataTable is not a function
at scripts.js:111:21
at scripts.js:235:3
The answer is that jQuery isn't accessible in the scope. As to why that is - we'd really need a test case showing the issue. Ideally if you could link to a git repo which is a minimal reproduction of that error, I'll be able to look into what is going wrong and where.
Allan
I can't link the GitHub as the project is not open source.
However, here are a few pictures of the errors.
Can you create a test case that shows the issue please?
Allan
How do i create a test case?
All I'm doing right now is inserting my values into the table I copied from your documentation. the html page is in nextJs.
A git repo with a minimally reproducible example would do it. If that isn't an option for whatever reason, then you could use Stackblitz to create a complete stack.
Allan