'npm not installing unable to resolve dependency tree
Solution 1:[1]
Try npm install --legacy-peer-deps
Solution 2:[2]
By reading the errors, it seems like the selected-country@^5.0.1 needs @angular/cdk@~12.x, but you only have @angular/cdk@^10.2.3
You might want to try this:
npm update @angular/cdk@12
This basically will try to update your angular/cdk to version 12.
If this doesn't work. You can also try downgrading your Node.js to a lower version. I had to also downgrade my Node.js when I updated my entire Angular project from version 12 to 13.
If this still doesn't work, you can try out these methods answered by our community.
Unable to resolve dependency tree error when installing npm packages
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | dinesh oz |
| Solution 2 | skouch2022 |

