Topic: npm install MDB Pro in Angular 8

Braulio Linares free asked 5 years ago


I follow this tutorial https://mdbootstrap.com/docs/angular/getting-started/quick-start/ to install via npm MDB pro, in Angular 8 but when i ng serve i have this error:

ERROR in ./node_modules/ng-uikit-pro-standard/fesm2015/ng-uikit-pro-standard.js 12214:59-67
"export 'DOCUMENT' was not found in '@angular/platform-browser'
ERROR in ./node_modules/ng-uikit-pro-standard/assets/scss/mdb.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--13-3!./node_modules/ng-uikit-pro-standard/assets/scss/mdb.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):

.picker__frame:not() {
                  ^
      Expected selector.
   ╷
54 │ .picker__frame:not(){
   │                    ^
   ╵
  node_modules/ng-uikit-pro-standard/assets/scss/angular/pro/_data-picker.scss 54:20  @import
  node_modules/ng-uikit-pro-standard/assets/scss/angular/mdb-angular.scss 13:9        @import
  stdin 123:9                                                                         root stylesheet
      in /media/braulio/Data/Documents/Desarrollo/panda/node_modules/ng-uikit-pro-standard/assets/scss/angular/pro/_data-picker.scss (line 54, column 20)

Nacho Herranz free commented 1 year ago

Hi,

I have the same problem than Braulio, but 3 years later. The problem is that this code is new for me, and it had been running in others PCs, but now I don´t know how to run in my machine. I´ve tride downgrading Angular via these 3 commands:

npm uninstall -g @angular/cli

npm cache clean --force

npm install -g @angular/cli@7.0.3

but it doesn´t work... and sincerenly, I think this is not the solution now, because 3 years have passed. Any ideas about what´s happening?

Annex: my log, but as I said is very similar than Braulio´s

ERROR in ./node_modules/ng-uikit-pro-standard/assets/scss/mdb.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./node_modules/ng-uikit-pro-standard/assets/scss/mdb.scss) Module build failed (from ./node_modules/sass-loader/lib/loader.js):

.picker_frame:not() { ^ Expected selector. ╷ 54 │ .picker_frame:not() { │ ^ ╵ node_modules\ng-uikit-pro-standard\assets\scss\angular\pro_data-picker.scss 54:20 @import node_modules\ng-uikit-pro-standard\assets\scss\angular\mdb-angular.scss 13:9 @import stdin 123:9 root stylesheet in C:\angular\Primorski\node_modules\ng-uikit-pro-standard\assets\scss\angular\pro_data-picker.scss (line 54, column 20) i 「wdm」: Failed to compile.


Damian Gemza staff answered 5 years ago


Dear @Braulio Linares

The MDB Angular 7 is not compatible with Angular 8. Please downgrade your project to the Angular 7 until we'll ship MDB 8.

We're working on it, but you guys have to give us more time because we want to check everything twice.

Best Regards,

Damian


Braulio Linares free commented 5 years ago

Hi Damian I create a new project with Angular 7.0.3 and i still have the same probleme, inclusi i use the manual instalation and the same problem, what i can do?

Thanks


Damian Gemza staff commented 5 years ago

Dear @Braulio Linares

There's no possibility, that you're having similar problem when using Angular 7 application.

Is there a possibility to send me your application via email? You can find me here: d.gemza@mdbootstrap.com

Please remove the node_modules directory before sending.

Best Regards,

Damian


Braulio Linares free commented 5 years ago

I remove node_modules and package-lock change the version of @angular-devkit/build-angular, and everything is good. Thank you very much for the support @Damian Gemza!



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 7.5.4
  • Device: Laptop
  • Browser: Google Chrome
  • OS: Ubuntu
  • Provided sample code: No
  • Provided link: Yes