I've built myself a custom WordPress theme that uses Bootstrap 4. It's based on the Roots Sage 8.6.0 starter theme. All theme scripts, including Bootstrap, are compiled into a main.js file. The main.js is enqueued with jQuery as a dependency.
You can see it here: https://www.patrickiverson.com/
As the error states, Bootstrap's scripts require jQuery to be loaded first, which seems to be done and I've verified by viewing my source code. See below (I removed all the CDATA, but this was copied from the "View Page Source" while on my homepage). jQuery is the very first script loaded, and my main.js is second-to-last.
I'm still getting the "Uncaught TypeError: Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript." error. It is breaking other functionality, such as an auto-hiding navbar, and a filter on my portfolio.
I'm using the Roots Soil 3.8.1 plugin as well, which has a feature to move all js to the footer. I've turned that off and on. I've recompiled my theme scripts. I've uninstalled various plugins as well. Nothing seems to eliminate that error.
<script src="/wp-includes/js/jquery/jquery.js"></script>
<script src="/wp-includes/js/jquery/jquery-migrate.min.js"></script>
<script src="/wp-content/plugins/contact-form-7/includes/js/scripts.js"></script>
<script src="/wp-content/plugins/responsive-lightbox-lite/assets/nivo-lightbox/nivo-lightbox.min.js"></script>
<script src="/wp-content/plugins/responsive-lightbox-lite/assets/inc/script.js"></script>
<script src="/wp-content/plugins/wordfence/js/admin.ajaxWatcher.1560275180.js"></script>
<script src="/wp-content/plugins/wpcf7-redirect/js/wpcf7-redirect-script.js"></script>
<script src="/wp-content/themes/clean2019/dist/scripts/main-6b986a9ffc.js"></script>
<script src="/wp-content/themes/clean2019/dist/scripts/loadmore-158c6c3f18.js"></script>
I expect that since jQuery seems to be loaded first Bootstrap wouldn't be throwing this error. Thank you in advance!