“A requires a peer of B but none was installed”. Consider it as “A
requires one of B’s peers but that peer was not installed and we’re
not telling you which of B’s peers you need.”
The automatic installation of peer dependencies was explicitly removed with npm 3.
So you cannot install peer dependencies automatically with npm 3 and upwards.
Updated Solution:
Use following for each peer dependency to install that and remove the error
npm install --save-dev xxxxx
Deprecated Solution:
-
You can use npm-install-peers to find and install required peer dependencies.
npm install -g npm-install-peers
npm-install-peers
-
If you are getting this error after updating any package’s version then remove
node_modules
directory and reinstall packages bynpm install
ornpm cache clean
andnpm install
.