mdb angular 8 causes CI/CD build failed due to export '


Topic: mdb angular 8 causes CI/CD build failed due to "export 'ɵɵdefineInjectable' was not found in '@angular/core'"

axa pro premium priority asked 5 years ago

After mdb rolled out version 8 for angular few days ago our Google Build CI/CD pipeline also failed. Hopefully, mdb team can investigate it for us. I presume it may something like @angular/material and @angular/cdk with Angular 8 compatibility itself. https://stackoverflow.com/questions/56595071/angular-material-does-not-work-version-angular-7

We found the "error" in below:

WARNING in ./node_modules/ng-uikit-pro-standard/fesm5/ng-uikit-pro-standard.js 10368:57-75"export 'ɵɵdefineInjectable' was not found in '@angular/core'

Our resolution is to update package.json with specific version 7.5.4 (See below).Otherwise, it'd fetch latest mdb version 8 and causes build failure.

package.json "ng-uikit-pro-standard": "git+https://oauth2:@git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git#7.5.4",


Vilaggio commented 5 years ago

How exactly do I add this update? I'm new to this. Here is my error:

WARNING in ./node_modules/ng-uikit-pro-standard/fesm5/ng-uikit-pro-standard.js 10368:57-75 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

Thank you.


Vilaggio commented 5 years ago

I added "git+https://oauth2:@git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git#7.5.4

To my package.json file. I still get the same error.


Arkadiusz Idzikowski staff commented 5 years ago

Please try to remove node_modules and package-lock.json and run npm install command again. If that won't help please paste here your package.json and angular.json files content (please remember to remove your private token if it's added in the package.json).


Damian Gemza staff answered 5 years ago

Dear @axa

If you didn't specified the MDB Angular version in package.json by using the #7.5.4 tag in ng-uikit-pro-standard dependency path, CI/CD pipelines will install the latest version of MDB Angular (MDB 8).

MDB 8 is compatible only with Angular 8, so if your app runs on Angular 7, you have to use the MDB Angular 7 (latest stable release is 7.5.4).

If you want to use MDB 8 in your project, please upgrade your project to Angular 8.

Best Regards,

Damian


Arkadiusz Idzikowski staff answered 5 years ago

You probably installed MDB Angular v8 in the project that uses Angular v7, that's why you get this error. If you want to downgrade your MDB version, please use this command (7.5.4 at then end is the version number that will be installed):

npm install git+https://oauth2:YOUR_TOKEN@git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git --save

You can also migrate your project to use version 8 of Angular and MDB Angular. We explained how to do that in our migration guide:

https://mdbootstrap.com/docs/angular/getting-started/migration/


peterhaiti19 pro answered 5 years ago

Hello @Damian Gemza I have the same problem WARNING in ./node_modules/ng-uikit-pro-standard/fesm5/ng-uikit-pro-standard.js 10666:57-75 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

  • Can you please tell me how tp upgrade or downgrade the angular project please ?

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: Pro
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: 8.0.0
  • Device: laptop
  • Browser: chrome
  • OS: macos
  • Provided sample code: No
  • Provided link: Yes