Software⏱️ 2 min read📅 2026-06-03

How to Fix: How do I fix the npm UNMET PEER DEPENDENCY warning?

Resolve UNMET PEER DEPENDENCY issue with npm.

Quick Answer: Update Node.js and npm to the latest versions, then run "npm install" again.

The npm UNMET PEER DEPENDENCY warning occurs when a package requires a version of another package that is not installed in your project. In this case, the error message indicates that angular-material and mdi require versions of angular-animate and angular-aria that are not installed.

🔍 Why This Happens

  • Angular-material and mdi are peer dependencies, meaning they require the same version of angular to be installed in your project.

🛠️ Step-by-Step Verified Fixes

Method 1: Update Angular Version

  1. Step 1: Run the command `npm install angular@latest` to update the version of angular in your project.

Method 2: Install Peer Dependencies Separately

  1. Step 1: Run the command `npm install angular-animate@latest` and then `npm install angular-aria@latest` to install the required peer dependencies separately.

🎯 Final Words

To resolve this issue, you can either update the version of angular in your project or install the peer dependencies separately. By following these steps, you should be able to fix the npm UNMET PEER DEPENDENCY warning and successfully install angular-material and mdi.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions