Module not found: Error: Can't resolve '@angular/animations' Module not found: Error: Can't resolve '@angular/animations' angular angular

Module not found: Error: Can't resolve '@angular/animations'


In app.module add this:

import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

And lather in the module add it to imports:

imports: [BrowserAnimationsModule]

And remove the @angular/animations import statement.

Maybe by applying npm install you updated your Angular version from v.2 to v.4.

UPDATE:

or just add this to your package.json (Choose the version you need):

"dependencies": {    "@angular/animations": "^4.0.1",}

Once you added this to your dependencies, apply npm install again.

UPDATE 2:

Even a quicker way:

npm install @angular/animations --save


In package.json remove (^) "@angular/material": "^2.0.0-beta.2". In latest angualr.material we are getting this error.


npm install will install the latest Angular Framework, which is now 4.

the solution is above mentioned already by others.

Cheers.