It seems like the issue is with the Popper.js library. Try importing it like this:
import Popper from 'popper.js/dist/esm/popper';
Also, make sure to add the following line to your bootstrap.js file:
window.Popper = Popper;
If that doesn't work, try installing the legacy version of Popper.js:
npm install @popperjs/[email protected]
Then, import it like this:
import { createPopper } from '@popperjs/core/dist/esm/popper';
And add the following line to your bootstrap.js file:
window.createPopper = createPopper;
Finally, make sure to include the necessary Bootstrap JavaScript files in your layout view:
<script src="{{ mix('js/app.js') }}"></script>
<script src="{{ mix('js/bootstrap.js') }}"></script>