Cannot set properties of undefined (setting 'bootstrap')

Cannot set properties of undefined (setting 'bootstrap')

ibokatibokat Posts: 5Questions: 4Answers: 0

After upgrading to version 2.0.0 (npm packages) I now get the error

Cannot set properties of undefined (setting 'bootstrap')

import $ from 'jquery';
import DataTable from 'datatables.net-bs4';
import Editor from 'datatables.net-editor-dt';
import 'datatables.net-autofill-bs4';
import 'datatables.net-buttons-bs4';
import 'datatables.net-buttons/js/buttons.colVis.mjs';
import 'datatables.net-buttons/js/buttons.html5.mjs';
import 'datatables.net-buttons/js/buttons.print.mjs';
import 'datatables.net-colreorder-bs4';
....

I saw there was a way to fix it with the ""overrides": {
"datatables.net-bs4": {
"datatables.net": "2.0.0"
}
}

But this does not work for me.

Answers

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    That override should only be needed if you are using 1.13.x (and only until I release 1.13.11 later today).

    You haven't provided a test case, so I'm not sure how much help I can be, but I've taken your import statements and created this example, which is running fine.

    Perhaps you can create a test case showing the issue you are having please.

    Allan

  • ibokatibokat Posts: 5Questions: 4Answers: 0

    The old version is working... so we just went back...

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    I'm afraid I can't really explain that since the example I provided with the latest version works. As I said, I can look into it further if you can provide a test case showing the issue. At the moment, I can't debug it because I can't see the error.

    Allan

Sign In or Register to comment.