5

I need to work on Angular 4 animation so i followed the usual steps like importing the BrowserAnimationsModule module in the root module and importing it in the component. I have also installed npm modules but I am getting an error as

node_modules/@angular/animations/browser"' has no exported member '?DomAnimationEngine' 

Please let me know what i need to do to solve it.

5
  • we need to see code where you actually use the DomAnimationEngine Commented Jun 27, 2017 at 14:14
  • Below is the entire error that i am getting ERROR in /node_modules/@angular/platform-browser/animatio ns/src/providers.d.ts (8,119): Module '"/node_modules/@an gular/animations/browser"' has no exported member '?DomAnimationEngine'. webpack: Failed to compile. Commented Jun 27, 2017 at 16:49
  • In the providers.d.ts file it is giving error at import for DomAnimationEngine. Can you please confirm where should i export it?? Commented Jun 27, 2017 at 16:59
  • I was having similar issues and I was able to resolve the compile issue by upgrading to 4.2.0 if you're aren't already on it. I was following the ionic upgrade procedure to 3 and post said to use 4.1.3 Commented Jun 29, 2017 at 3:28
  • I deleted and reinstalled all my node modules and its working now. @getbuckts anyways thanks for the help. Commented Jun 29, 2017 at 9:08

1 Answer 1

12

Check your package.json file, and remove the ^ from the angular/animations dependency: before:

 "@angular/animations": "^4.1.3", 

after:

 "@angular/animations": "4.1.3", 

then delete your node_modules folder and run

npm install 

If it doesn't work try following the issue recommendations on https://github.com/angular/angular/issues/17400

I had the same problem, and after some struggling it worked.

Sign up to request clarification or add additional context in comments.

2 Comments

For me it was "@angular/animations": "^4.4.7", I changed it with "@angular/animations": "^4.1.3", and worked for me. Thanks!
thanks, I needed to downgrade animations to similar version as angular was! :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.