Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: MDB Pro jQuery default Bootstrap styling import

rickgoemans free asked 4 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?


Mateusz Łubianka staff commented 4 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 free commented 4 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 4 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 free commented 4 years ago

Ok, could you send me a notification (through mail?) if you guys update it, I will (help) test it.


rickgoemans free answered 4 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.


Mateusz Łubianka staff commented 4 years ago

Is it work fine now?

Best,



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: 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: Yes
  • Provided link: No