Issues with CDN Loading in ERPNext

Hi,

I’m trying to include the following CDNs in my ERPNext v14 site, but the scripts are not loading:

jQuery: https://code.jquery.com/jquery-3.6.0.min.js
DataTables: https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js

Inclusion Code:

My ERPNext Page

The error in the console is: Uncaught TypeError: $(...).DataTable is not a function. This setup works in a normal HTML file but not within ERPNext.

Does anyone know why this might be happening or how to resolve it?

Thanks.

ERPNext already includes jQuery in its core, but it may be a different version from the one you’re trying to load. Why you need to include when itsi there.

Try to use hooks to resolve the issue / comflict in versions.

#RespectQuestion #EncourageNewUser