Search code examples
angularpackage.jsonngx-bootstrapangular-cli-v9

an issue of installing ngx-bootstrap with Angular 14 (Package "ngx-bootstrap" was found but does not support schematics)


I'm having a problem install ngx-bootstrap with angular 14 the package.json as follows:

{
  "name": "testproj",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^14.0.0",
    "@angular/common": "^14.0.0",
    "@angular/compiler": "^14.0.0",
    "@angular/core": "^14.0.0",
    "@angular/forms": "^14.0.0",
    "@angular/platform-browser": "^14.0.0",
    "@angular/platform-browser-dynamic": "^14.0.0",
    "@angular/router": "^14.0.0",
    "rxjs": "~7.5.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^14.0.3",
    "@angular/cli": "~14.0.3",
    "@angular/compiler-cli": "^14.0.0",
    "@types/jasmine": "~4.0.0",
    "jasmine-core": "~4.1.0",
    "karma": "~6.3.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.0.0",
    "karma-jasmine-html-reporter": "~1.7.0",
    "typescript": "~4.7.2"
  }
}

I try install using ng add with this command: ng add ngx-bootstrap

I get the following error : Package "ngx-bootstrap" was found but does not support schematics enter image description here

then i try the manual installation i get this errors: enter image description here

I have no idea how to solve this please elaborate Thanks


Solution

  • Currently ngx-bootstrap is not compatible with angular 14. But you can force the installation by ignoring all peerDependencies when installing

    npm install ngx-bootstrap@latest --legacy-peer-deps