valor-software / ngx-bootstrap

Fast and reliable Bootstrap widgets in Angular (supports Ivy engine)
https://valor-software.com/ngx-bootstrap
MIT License
5.53k stars 1.69k forks source link

Cannot find module 'ngx-bootstrap'. In Angular 9.1 #5758

Closed fromage9747 closed 4 years ago

fromage9747 commented 4 years ago

Before opening an issue, please search for duplicates (opened and closed) https://github.com/valor-software/ngx-bootstrap/issues There's no need to open an issue here if you want to ask general question, use StackOverflow or Slack instead

Bug description: Cannot find module 'ngx-bootstrap'. In Angular 9.1

Plunker/StackBlitz that reproduces the issue:

Using Plunkr, StackBlitz is the best way to show your issue. Issues without link to an example of reproduction might be closed.

You can use one of starter templates:

Plunkr: https://plnkr.co/edit/0NipkZrnckZZROAcnjzB?p=preview

StackBlitz: https://stackblitz.com/edit/ngx-bootstrap?file=app%2Fapp.module.ts

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap: 5.6.1

Angular: 9.1

Bootstrap:4.4.1

Build system: Angular CLI, System.js, webpack, starter seed:

Expected behavior Imports work as they did in Angular 9 and prior releases.

Workaround: Change 'ngx-bootstrap' to 'ngx-bootstrap/someBootstrapComponent'.

For example, my previous import was:

import { BsModalRef, BsModalService } from 'ngx-bootstrap'; And my new import looks like:

import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';

fromage9747 commented 4 years ago

Workaround allows you to carry on working with the module as expected. Only logging this bug to notify the maintainer.

fromage9747 commented 4 years ago

Nevermind. CLosing: https://github.com/valor-software/ngx-bootstrap/issues/5753