Installing UNMET PEER DEPENDENCY @ angular / animation error

I am trying to install @ angular / animations. Apparently this is a dependency on @ angular / material as I am getting GET http://localhost:3000/@angular/animations 404 (Not Found)

from when the material was installed.

I am getting this error while installing:

> npm install @angular/animations --save
angular-quickstart@1.0.0 D:\My Documents\Visual Studio 
2017\Projects\materialtest\frontend
+-- @angular/animations@4.1.2
`-- UNMET PEER DEPENDENCY @angular/core@4.0.3
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 
(node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: 
{"os":"win32","arch":"x64"})
npm WARN @angular/animations@4.1.2 requires a peer of @angular/core@4.1.2 but none was installed.

      

I think I need version 4.0.3 of the kernel. But he also says that I need 4.1.2. I have 4.0.3. Here is the output from my npm deprecated:

Package                            Current   Wanted   Latest  Location
@angular/common                      4.0.3    4.0.3    4.1.2  angular-quickstart
@angular/compiler                    4.0.3    4.0.3    4.1.2  angular-quickstart
@angular/core                        4.0.3    4.0.3    4.1.2  angular-quickstart
@angular/forms                       4.0.3    4.0.3    4.1.2  angular-quickstart
@angular/http                        4.0.3    4.0.3    4.1.2  angular-quickstart
@angular/platform-browser            4.0.3    4.0.3    4.1.2  angular-quickstart
@angular/platform-browser-dynamic    4.0.3    4.0.3    4.1.2  angular-quickstart
@angular/router                      4.0.3    4.0.3    4.1.2  angular-quickstart
@types/jasmine                      2.5.36   2.5.36   2.5.47  angular-quickstart
@types/node                         6.0.73   6.0.73   7.0.18  angular-quickstart
jasmine-core                         2.4.1    2.4.1    2.6.1  angular-quickstart
protractor                          4.0.14   4.0.14    5.1.2  angular-quickstart
rxjs                                 5.0.1    5.0.1    5.4.0  angular-quickstart
systemjs                           0.19.40  0.19.40  0.20.12  angular-quickstart
tslint                              3.15.1   3.15.1    5.2.0  angular-quickstart
typescript                           2.1.6    2.1.6    2.3.2  angular-quickstart

      

Also, @ angular / animations are already in my package.json: "@angular/animations": "^4.1.2",

but the folder doesn't exist.

So how do I set up my animation? Do I need to update Angular even though I installed the latest angular-quickstart today? How is it? This post is about how doesn't work for me (maybe because I'm on windows?)

Or am I wrong - all I want now is @ angular / stuff so I can continue with my tutorial.

+3


source to share


2 answers


Angular requires every @ angular package to be in the same version (but not required, but must). Since you installed @angular/animations

to the latest version (v4.1.2), you need to edit package.json

and change the packages @angular

to 4.1.2

and run npm install

. Or just install each one manually with npm i @angular/xxx@latest --save

.



+1


source


I am working on a Pluralsight tutorial and had the same problem. I updated package.json

to include: "@angular/animations": "^4.0.0"

as a dependency, since I had it "@angular/core": "^4.0.0"

as a dependency. So they match and it seemed to work.



+1


source







All Articles