I’m wondering if I am resolving unmet peer dependencies correctly in my package.json. If I encounter the error, UNMET PEER DEPENDENCY {package@version}, should I install the dependency to “dependencies” or “devDependencies” or does it depend?
I have tried
npm install --save {package}
and
npm install --save-dev {package}
As a note, I’m running the following after each installation -
rm -rf node_modules
npm cache clean
npm install
My specific issue is that after running npm install, I receive the following errors for unmet dependencies -
├── UNMET PEER DEPENDENCY @angular/animations@4.1.0
├── UNMET PEER DEPENDENCY @angular/common@4.1.0
├── UNMET PEER DEPENDENCY @angular/compiler@4.1.0
├── UNMET PEER DEPENDENCY @angular/core@4.1.0
├── UNMET PEER DEPENDENCY @angular/platform-browser@4.1.0
├── UNMET PEER DEPENDENCY @angular/platform-browser-dynamic@4.0.3
├── UNMET PEER DEPENDENCY @angular/common@~2.4.5
├── UNMET PEER DEPENDENCY @angular/core@~2.4.5
├── UNMET PEER DEPENDENCY d3@4.8.0
├── UNMET PEER DEPENDENCY rxjs@5.3.0
└── UNMET PEER DEPENDENCY zone.js@0.8.9
However, even after installing using either of the following two commands followed by removing the node_modules & cleaning the cache, I still have the unmet dependencies.
npm install --save-dev @angular/animations @angular/common @angular/compiler @angular/core @angular/platform-browser @angular/common @angular/core d3 less rxjs zone.js
npm install --save @angular/animations @angular/common @angular/compiler @angular/core @angular/platform-browser @angular/common @angular/core d3 less rxjs zone.js
So most importantly, is my approach to installing the UNMET dependencies correct? And if someone knows a fix for my issue, I’d appreciate it.
via David Streid
No comments:
Post a Comment