I'm a bit late to the party, however there's an important note:
Your scripts might be in the right order but watch out for any async
s in your script tag (like this)
<script type="text/javascript" src="js/bootstrap.js" async></script>
This might be causing the issue. Especially if you have this async
set only for Production environments this can get really frustrating to reason about.