Search code examples
angularnpmpackageng2-bootstrap

Angular2 ng2-bootstrap UNMET PEER DEPENDENCY


I am trying to install ng2-bootstrap with npm but it gives these errors/warnings:

unmet peer dependency

How can I fix this?


Solution

  • ng2-bootstrap requires latest releases of Angular 2 libraries (RC5), so you need to update your package.json file to download them. It requires RC5 releases of common, compiler, core, forms and platform-server, but there are more RC5 releases, you can see all of them here and it is highly recommended that you use all the latest releases.

    Edit:

    I was wrong, the problem seems to be that you are already using RC5 releases, but ng2-bootstrap dev team did not publish their version for Angular 2 RC5 release. If you check dependency status for ng2-bootstrap here, you can see that it still requires RC4 releases. My advice is to wait until ng2-bootstrap team publish an update for RC5, which is expected to happen any day according to this.