0

I was using these versions

"dependencies": {
    "@angular/animations": "^5.0.0",
    "@angular/common": "^4.0.0",
    "@angular/compiler": "^4.0.0",
    "@angular/core": "^4.0.0",
    "@angular/forms": "^4.0.0",
    "@angular/http": "^4.0.0",
    "@angular/platform-browser": "^4.0.0",
    "@angular/platform-browser-dynamic": "^4.0.0",
    "@angular/router": "^4.0.0",
    "archiver": "^2.1.0",
    "body-parser": "^1.18.2",
    "core-js": "^2.4.1",
    "cors": "^2.8.4",
    "express": "^4.16.2",
    "file-saver": "^1.3.3",
    "rxjs": "^5.1.0",
    "zone.js": "^0.8.4"
  },

And my application was working perfect.

I tried compile it using ng build --prod --aot and got this error :

ERROR in Metadata version mismatch for module

and by referring this answer I downgraded @angular/animation version from 5 to 4. Now I am getting this error even if I am compiling using JIT .

Module '"C :/Codebase/cdf-onboarding/node_modules/@angular/animations/animations"' has no exported member 'AnimationBuilder'.

Module '"C :/Codebase/cdf-onboarding/node_modules/@angular/animations/animations"' has no exported member 'AnimationFactory'.

Thanks!

ricky
  • 1,644
  • 1
  • 13
  • 25

1 Answers1

-1

Couple of things, you can try:

1) you should import BrowserAnimationsModule from @angular/platform-browser/animations in your App NgModule.

2) If you import any animations services or tools from @angular/core, you should import them from @angular/animations.

3) please update angular versions too.

Nimish goel
  • 2,561
  • 6
  • 27
  • 42