Topic: MDB Pro jQuery default Bootstrap styling import
rickgoemans asked 5 years ago
Expected behavior
When you add the MDB Pro jQuery package with NPM/Yarn and using @import '~mdbootstrap-pro/css/bootstrap';
(or @import '~mdbootstrap-pro/css/bootstrap.min';
) it should import the default Bootstrap correctly without any errors.
Actual behavior
If you import either the minimized version or the normal version you get the error:
ModuleBuildError: Module build failed (from ./node_modules/resolve-url-loader/index.js):
Error: ENOENT: no such file or directory, open 'file:///Users/rickgoemans/Code/hobbybeurs/resources/sass/bootstrap.css.map'
In short, it can't find the mapping file, which isn't included in the package.
Resources (screenshots, code snippets etc.)
Once again, I can't believe this was not triggered during testing and I hope this will be fixed soon because at the moment I would have to manually download Bootstrap and match the version on which MDB Pro 4.12.0 is based and add it myself.
Isn't it better to add bootstrap to your package's dependencies and lock it on the version that matches with MDB's version (in this case bootstrap: 4.4.1
)? Same goes for all the addons?
rickgoemans answered 5 years ago
I've found the solution, if you fully enter the css file name like this:
@import '~mdbootstrap-pro/css/bootstrap.css';
Instead of:
@import '~mdbootstrap-pro/css/bootstrap';
It works correctly.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.12.0
- Device: Macbook Pro Touchbar 2017
- Browser: Brave (Chromium based)
- OS: Mac OS Catalina 10.15.3
- Provided sample code: No
- Provided link: No
Mateusz Łubianka staff commented 5 years ago
Hi @rickgoemans,
The bootstrap files (css and js) are in our packages. You can find them in css/js folders. Could you say more about your project structure?
Best,
rickgoemans commented 5 years ago
Hey Mateusz,
I've recently updated to 4.13.0 and the issue still occurs. My project's structure is plain Laravel + MDBoostrap Pro added through yarn.
Mateusz Łubianka staff commented 5 years ago
We have a little issue related with mdb an laravel. It is on our task list, so we will try to fix it ass soon as possible.
I will also create a task with idea of adding bootstrap to package's dependencies and lock it on the version that matches with MDB's version.
Best,
rickgoemans commented 5 years ago
Ok, could you send me a notification (through mail?) if you guys update it, I will (help) test it.