I have been working on my project with Bootstrap 4 beta and Laravel 5.4, using npm and Laravel mix to load my JavaScript dependencies. Everything was going smoothly until I encountered an error while trying to use Bootstrap JavaScript methods. The error message I received was "Bootstrap dropdown require Popper.js". I tried downloading and loading Popper.js in both my bootstrap.js and webpack.mix.js files, but the error persisted. Can anyone help me identify what I might have done wrong?
bootstrap.js
try {
window.$ = window.jQuery = require('jquery');
require('popper.js');
require('datatables.net');
require('datatables.net-autofill');
require('datatables.net-buttons');
require('bootstrap');
} catch (e) {
console.log(e);
}
webpack.mix.js
const { mix } = require('laravel-mix');
mix.js([
'resources/assets/js/app.js',
'node_modules/jquery/dist/jquery.min.js',
'node_modules/popper.js/dist/umd/popper.js',
'node_modules/bootstrap/dist/js/bootstrap.js',
'node_modules/datatables.net/js/jquery.dataTables.js',
'node_modules/datatables.net-buttons/js/dataTables.buttons.js',
'node_modules/datatables.net-autofill/js/dataTables.autoFill.js',
], 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css');