Reputation: 9441
I realised I was only using @angular/animations
in one place in my project, so I replaced with a purely css solution and removed it from my project, along with BrowserAnimationsModule
.
I got this error:
An unhandled exception occurred: The target entry-point "@angular/material/dialog" has missing dependencies:
- @angular/animations
I was under the impression that if a library I was using had a dependency, that would be handled in their package.json, and that I dont need to add every dependencies dependency to my project.
Any idea what I'm missing here?
Upvotes: 0
Views: 1615
Reputation: 5998
You are doing everything right.
The point is, that some packages don't want to bring their dependencies to your project, because, most likely, you will already have them. Thus they declare them as peer dependency
and rely on you.
You can find some explanations at the npm official documentation regarding the peer dependency.
Unfortunately, this mean that you will be not able to get rid of them, unless you are using the code that requires such dependency.
Upvotes: 1