angular-bootstrap-md.js:10574 Uncaught TypeError


Topic: angular-bootstrap-md.js:10574 Uncaught TypeError

Matev asked 3 years ago

Hello,

I'm trying to install angular bootstrap md with npm from here: https://www.npmjs.com/package/angular-bootstrap-md

When I do all steps I receive this error in my console:

angular-bootstrap-md.js:10574 Uncaught TypeError: Object(...) is not a function at angular-bootstrap-md.js:10574 at Module../node_modules/angular-bootstrap-md/fesm5/angular-bootstrap-md.js (angular-bootstrap-md.js:10576) at webpack_require (bootstrap:78) at Module../src/app/app.module.ts (app.component.ts:8) at webpack_require (bootstrap:78) at Module../src/main.ts (main.ts:1) at webpack_require (bootstrap:78) at Object.0 (main.ts:12) at webpack_require (bootstrap:78) at checkDeferredModules (bootstrap:45)

I have this error on second project and can't find how to fix it. There is my dependencies in package.json:

"@angular/animations": "~7.2.0",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/forms": "~7.2.0",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/router": "~7.2.0",
"@fortawesome/fontawesome-free": "^5.10.2",
"@ng-bootstrap/ng-bootstrap": "^5.1.0",
"@types/chart.js": "^2.8.5",
"angular-bootstrap-md": "^8.3.0",
"animate.css": "^3.7.2",
"chart.js": "^2.5.0",
"core-js": "^2.5.4",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"ngx-toastr": "^10.0.4",
"rxjs": "~6.3.3",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"

Have "@ng-bootstrap/ng-bootstrap": "^5.1.0", but I don't know if they have conflict. I tried to remove it, but this isn't help.

This is styles & scripts from angular.json:

 "styles": [
          "node_modules/font-awesome/scss/font-awesome.scss",
          "node_modules/angular-bootstrap-md/assets/scss/bootstrap/bootstrap.scss",
          "node_modules/angular-bootstrap-md/assets/scss/mdb.scss",
          "src/styles.scss"
        ],
        "scripts": [
          "node_modules/chart.js/dist/Chart.js",
          "node_modules/hammerjs/hammer.min.js"
        ],

I have no idea how ti fix this problem...

Best regards!


Arkadiusz Idzikowski staff commented 3 years ago

We tried to reproduce this problem on fresh Angular project but without success. Could you send us a simple demo so we can check if your project is configured properly? You can send it to a.idzikowski@mdbootstrap.com


madhubabumynampati commented 2 years ago

Any Update on this issue please answer ASAP?


Arkadiusz Idzikowski staff commented 2 years ago

Please provide more information about the problem and how we can reproduce that. Make sure that you use Angular version compatible with specific MDB version. For example MDB Angular 7.x.x is compatible with Angular 7, and MDB Angular 8.x.x is compatible with Angular 8.


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
  • User: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 8.3.0
  • Device: PC
  • Browser: Brave
  • OS: Windows 10 Pro
  • Provided sample code: No
  • Provided link: Yes