pdfmake.min.js.map is not found and console shows a 404 warning
pdfmake.min.js.map is not found and console shows a 404 warning
Hello!
I encounter a warning when I use DataTables on my project.
Scenario:
- Go to the https://datatables.net/download page
- Select Bootstrap 4 as Styling
- Select DataTables as packages
- Select Html5 export, Print view, Col reorder, Fixed Columns, Fixed header and Row group as extensions
- Select Download as download method
- Extract the archive into your project
- Call DataTables in your <head>
by doing <script src="{{ asset('javascript/library/datatables.min.js') }}"></script>
- Create a DataTable on a page by doing $('#myTable').DataTable({});
Problem encountered:
My console shows a warning
Erreur dans les liens source : request failed with status 404 URL de la ressource : http://127.0.0.1:8000/javascript/library/datatables.min.js URL du lien source : pdfmake.min.js.map
I think my problem is related to: https://datatables.net/forums/discussion/31551/failed-to-load-resource-error-bug
This question has an accepted answers - jump to answer
Answers
Hi @DarckCrystale ,
I just tried that and it worked as expected for me. The thread you linked to is an old one. Have you included the external libraries for pdfmake - the error is suggesting you haven't. See the JS and CSS tabs on this example here.
If that doesn't help, could you link to a page that's showing the problem, please. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Hi I had the same problem, I solved putting the JS file into the folder that contains datatable files, means pdfmake.min.js.map should be included in the folder with the rest of the files toguether with pdfmake.min.js... you can download it from here
I am also getting this error in the console as well. Fortunately, the PDF generation does not require the mapping so this warning can be ignored.
Hopefully in future releases this dependency is removed.
Thanks,
Harold
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin