Struggling to load jquery, popperjs, and bootstrap (v4-beta) using requirejs, I'm consistently encountering this error in the console:
Uncaught Error: Bootstrap dropdown require Popper.js (https://popper.js.org)
at bootstrap.js:6
at bootstrap.js:6
at bootstrap.js:6
Below is the snippet of my code in the main file:
requirejs.config({
paths: {
'jquery': 'lib/jquery',
'popper': 'lib/popper',
'bootstrap': 'lib/bootstrap'
},
shim: {
'bootstrap': ['jquery', 'popper']
}
});
requirejs(['jquery', 'popper', 'bootstrap'], function(jquery, popper, bootstrap) {});
This issue has been raised multiple times related to problems with loading popper.js and bootstrap using requirejs. Indeed, I'm utilizing the umd version specified here.
All files appear to be loading correctly on the page:
<script data-main="js/main.js" src="js/require.js"></script>
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="main" src="js/main.js"></script>
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="jquery" src="js/lib/jquery.js"></script>
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="popper" src="js/lib/popper.js"></script>
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="bootstrap" src="js/lib/bootstrap.js"></script>
The persisting error has brought me to believe that it might be related to my require configuration. Any insights on this?