How do I fix the npm UNMET PEER DEPENDENCY warning? How do I fix the npm UNMET PEER DEPENDENCY warning? angularjs angularjs

How do I fix the npm UNMET PEER DEPENDENCY warning?


npm no longer installs peer dependencies so you need to install them manually, just do an npm install on the needed deps, and then try to install the main one again.


Reply to comment:

it's right in that message, it says which deps you're missing

UNMET PEER DEPENDENCY angular-animate@^1.5.0 +-- UNMET PEER DEPENDENCY angular-aria@^1.5.0 +-- angular-material@1.0.6 +UNMET PEER DEPENDENCY angular-messages@^1.5.0 `-- mdi@1.4.57` 

So you need to npm install angular angular-animate angular-aria angular-material angular-messages mdi


UNMET PEER DEPENDENCY error is thrown when the dependencies of one or more modules specified in the package.json file is not met. Check the warnings carefully and update the package.json file with correct versions of dependencies.

Then run

rm -rf node_modules/npm cache cleannpm install

This will install all the required dependencies correctly.


In my case all the dependencies were already there. Please update NPM in that case as it might have been crashed. It solved my problem.

npm install -g npm