{"id":361,"hash":"6c687e7aa1adcb06e3eda1e07db0aa4f61cbc7fef376ba4d061b6403a03f749e","pattern":"How do I fix the npm UNMET PEER DEPENDENCY warning?","full_message":"I'm on Windows 10, with Node 5.6.0 and npm 3.6.0. I'm trying to install angular-material and mdi into my working folder. npm install angular-material mdi errors with:\n\n+-- angular@1.5.0\n\n+-- UNMET PEER DEPENDENCY angular-animate@^1.5.0\n\n+-- UNMET PEER DEPENDENCY angular-aria@^1.5.0\n\n+-- angular-material@1.0.6\n\n+-- UNMET PEER DEPENDENCY angular-messages@^1.5.0 `-- mdi@1.4.57\n\nnpm WARN enoent ENOENT: no such file or directory, open\n'C:\\Users\\xxxxx\\Desktop\\ngClassifieds\\package.json' \n\nnpm WARN angular-material@1.0.6 requires a peer of\nangular-animate@^1.5.0 but none was installed. \n\nnpm WARN angular-material@1.0.6 requires a peer of angular-aria@^1.5.0\nbut none was installed. \n\nnpm WARN angular-material@1.0.6 requires a peer of\nangular-messages@^1.5.0 but none was installed.\n\nHow do I resolve this to get AngularJS Material and MDI installed?","ecosystem":"npm","package_name":"angularjs","package_version":null,"solution":"EDIT 2020\n\nFrom npm v7.0.0, npm automatically installs peer dependencies. It is one of the reasons to upgrade to v7.\n\nhttps://github.blog/2020-10-13-presenting-v7-0-0-of-the-npm-cli/\n\nAlso this page explains the rationale of peer dependencies very well.\nhttps://github.com/npm/rfcs/blob/latest/implemented/0025-install-peer-deps.md\n\nThis answer doesn’t apply all cases, but if you can’t solve the error by simply typing npm install\n, this steps might help.\n\nLet`s say you got this error.\n\nUNMET PEER DEPENDENCY packageA@4.2.0\n\nnpm WARN packageB@3.3.0 requires a peer of packageA@^3.1.0 but none was installed.\n\nThis means you installed version 4.2.0 of packageA, but packageB@3.3.0 needs version 3.x.x of pakageA. (explanation of ^)\n\nSo you can resolve this error by downgrading packageA to 3.x.x, but usually you don`t want to downgrade the package.\n\nGood news is that in some cases, packageB is just not keeping up with packageA and maintainer of packageB is trying hard to raise the peer dependency of packageA to 4.x.x.\n\nIn that case, you can check if there is a higher version of packageB that requires version 4.2.0 of packageA in the npm or github.\n\nFor example, Go to release page\n\nOftentimes you can find breaking change about dependency like this.\n\npackageB v4.0.0-beta.0\n\nBREAKING CHANGE\npackage: requires packageA >= v4.0.0\n\nIf you don’t find anything on release page, go to issue page and search issue by keyword like peer. You may find useful information.\n\nAt this point, you have two options.\n\nUpgrade to the version you want\nLeave error for the time being, wait until stable version is released.\n\nIf you choose option1:\n\nIn many cases, the version does not have latest tag thus not stable. So you have to check what has changed in this update and make sure anything won`t break.\n\nIf you choose option2:\n\nIf upgrade of pakageA from version 3 to 4 is trivial, or if maintainer of pakageB didn’t test version 4 of pakageA yet but says it should be no problem, you may consider leaving the error.\n\nIn both case, it is best to thoroughly test if it does not break anything.\n\nLastly, if you wanna know why you have to manually do such a thing, this link explains well.","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/35738346/how-do-i-fix-the-npm-unmet-peer-dependency-warning","votes":313,"created_at":"2026-04-19T04:51:03.646624+00:00","updated_at":"2026-04-19T04:51:03.646624+00:00"}