Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ng-bootstrap with Angular 20

After updating Angular 19 to Angular 20 while having @ng-bootstrap/ng-bootstrap I receive the error:

The error in question

X [ERROR] No matching export in "node_modules/@angular/core/fesm2022/core.mjs" for import "afterRender"

node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs:2:321:
  2 │ ...ctor, afterNextRender, LOCALE_ID, forwardRef, afterRender, ApplicationRef, EnvironmentInjector, createC...

Since the release of Angular 20 was 2 days ago, I can understand that the dependant packages do not support the Angular 20 (yet). I used the newest version of ng-bootstrap (18.0.0) which is made for Angular 19. I looked for support and Stack Overflow should the place to be, so my questions are:

  1. Is the team of @ng-bootstrap/ng-bootstrap notified of this? If not, how can we reach them / let them know?
  2. If they are notified, how long can it take that ng-bootstrap supports Angular 20? A rough estimate is enough, 1 month, half a year?

Thank you in advance.

like image 871
Krant Avatar asked Jun 26 '26 17:06

Krant


2 Answers

ng-bootstrap doesn't support v20 yet. As afterRender has been renamed afterEveryRender in angular itself.

This PR needs to land.

like image 146
Matthieu Riegler Avatar answered Jun 28 '26 08:06

Matthieu Riegler


I was able to find a solution based on the PR that is mentioned https://github.com/ng-bootstrap/ng-bootstrap/issues/4828#issuecomment-2925667913

As of today I am running ng-bootstrap in Angular v20

like image 20
Marian07 Avatar answered Jun 28 '26 07:06

Marian07