Search code examples
angularnpmbootstrap-4angular-ui-bootstrap

bootstrap installation in angular 14 fail


I wanted to install Bootstrap in Angular 14 using "ng add @ng-bootstrap/ng-bootstrap" but I get an error in PhpStorm IDEA. What should I do?

Error

Error


Solution

  • Later edit

    Looks like the latest release v13.0.0 of ng-bootstrap adds support for Angular 14.1

    Original answer

    The latest stable version of @ng-bootstrap/ng-bootstrap which today 6/16/2022 is 12.1.2 is designed for Angular 13.

    The error you are seeing is due to the fact they have a peerDependecy to Angular 13 in their library.

    According to this issue https://github.com/ng-bootstrap/ng-bootstrap/issues/4340 they are currently working on releasing a new version that supports Angular 14. At this time you might get be able to install ng-bootstrap@next (which is version 13.0.0-beta.1 that's designed for Angular 14)