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 clean npm install.
With npm version 4 through to 6, a warning is issued when you run npm install to remind you to install the peer dependencies. Prior to version 4, npm automatically included peer dependencies if they weren't explicitly included.
A peer dependency specifies that our package is compatible with a particular version of an npm package. If a package doesn't already exist in the node_modules directory, then it is automatically added. As you install a package, npm will automatically install the dev dependencies.
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 +-- [email protected] +
UNMET PEER DEPENDENCY angular-messages@^1.5.0 `-- [email protected]`
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 clean
npm 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
npm-install-peers worked for me.
npm install -g npm-install-peers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With