error TS2307: Cannot find module '@ng-bootstrap/ng-bootstrap'
Solution 1:
If you have already tried to re npm install
after deleting node_modules, the problem persists, and you also then double-checked that '@ng-bootstrap' is under your node_modules directory, I would proceed as follows:
I would try first restarting the IDE, happens with Visual Studio Code and others as well...
-
Also you could try this (this would be for linux):
sudo npm install --save @ng-bootstrap/ng-bootstrap
cd @ng-bootstrap
sudo npm install
Make sure, in case you have more than one module, that only the app.module has the import like
NgbModule.forRoot()
, any other module should only haveNgbModule
within the import []
Hope it helps :)
Solution 2:
NG Bootstrap - Angular powered Bootstrap widgets
$ npm i @ng-bootstrap/ng-bootstrap
Angular widgets built from the ground up using only Bootstrap 4 CSS with APIs designed for the Angular ecosystem.
Below the list of supportive versions of Anuglar & Bootstrap :
ng-bootstrap - Angular - Bootstrap CSS
1.x.x 5.0.2 4.0.0
2.x.x 6.0.0 4.0.0
3.x.x 6.1.0 4.0.0
4.x.x 7.0.0 4.0.0
5.x.x 8.0.0 4.3.1
6.x.x 9.0.0 4.4.1
7.x.x 10.0.0 4.5.0