startbootstrap-sb-admin-2
startbootstrap-sb-admin-2 copied to clipboard
Sidebar toggle causing Uncaught TypeError: $(...).collapse is not a function
I'm implementing sbadmin on laravel using laravel-mix.
I'm using NPM installation and importing resources directly from the node_modules folder.
In my bootstrap.js
file, I already imported all required js (or maybe not) like in below script:
window._ = require('lodash');
try {
window.$ = window.jQuery = require('startbootstrap-sb-admin-2/vendor/jquery/jquery');
require('startbootstrap-sb-admin-2/vendor/jquery-easing/jquery.easing');
require('startbootstrap-sb-admin-2/vendor/chart.js/Chart.bundle');
require('startbootstrap-sb-admin-2/vendor/bootstrap/js/bootstrap.bundle');
require('startbootstrap-sb-admin-2/vendor/datatables/jquery.dataTables');
require('startbootstrap-sb-admin-2/vendor/datatables/dataTables.bootstrap4');
require('startbootstrap-sb-admin-2/js/sb-admin-2');
} catch (error) {
console.log(error);
}
When I build the assets (css, js, etc), it looks fine at first. But when I click the sidebar toggler, it has this error:
Did I miss something?