First check it exists a version of your library compatible with the version of Angular defined in package.json.
ng add @ng-bootstrap/ng-bootstrap
ng add ngx-bootstrap
Replace temporarily custom builders by default ones in angular.json
@angular-builders/custom-webpack:browser => @angular-devkit/build-angular:browser
@angular-builders/custom-webpack:dev-server => @angular-devkit/build-angular:dev-server
Add Angular Material using ng add
command:
ng add @angular/material
You will get the following questions:
? Choose a prebuilt theme name, or "custom" for a custom theme: *Choose any theme you like here*
? Set up global Angular Material typography styles? *Yes*
? Set up browser animations for Angular Material? *Do not include / error if you choose Include*
Angular Material Library is now installed in your project.
Put back custom builders in angular.json
@angular-devkit/build-angular:browser => @angular-builders/custom-webpack:browser
@angular-devkit/build-angular:dev-server => @angular-builders/custom-webpack:dev-server