question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning when building with AOT for NgbModalRef referring to Angular 5.x

See original GitHub issue

Bug description:

When building with AOT, I’m getting a warning, not an error though.

[ERROR]  11% building modules 14/14 modules 0 activeWarning: 
Can't resolve all parameters for NgbModalRef in 
/home/projects/angular-app/node_modules/@ng-bootstrap/ng-bootstrap/modal/modal-ref.d.ts: 
([object Object], [object Object], [object Object], ?). 
This will become an error in Angular v5.x

The build went through and no problem as for now but I forsee this will be when Angular move to v5.x

Version of Angular, ng-bootstrap, and Bootstrap:

Angular: 4.3.6

ng-bootstrap: 1.0.0-beta.3

Bootstrap: 4

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
leksimcommented, Oct 2, 2017

I’m facing this issue as an error on angular 4.4.3 while using the same 1.0.0-beta.5

I worked around this error by removing the reference to NgbModalRef from the NgModule and using any as shown below.

modal:any;

showModal(){ this.modal = this.modalService.open(content); }

closeModal(){ this.modal.close(); }

2reactions
djvelimircommented, Sep 18, 2017

FYI, just tried version: 1.0.0-beta.5, problem is fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Warning, will become error in Angular 5.x -
Warning, will become error in Angular 5.x. ... During angular-cli AOT build process: ... Warning: Can't resolve all parameters for NgbModalRef in ...
Read more >
Warning when building an Angular app with Ahead-of-time ...
Something to look into: I think that the build process uses AOT by default. You may want to look into seeing if there...
Read more >
angular/angular - Gitter
its build for enterprise large scale angular application builds ... I only get those warnings with the CLI builds but otherwise no errors...
Read more >
Angular2 Final: es2015.core.d.ts:17:14: Duplicate identifier ...
Coding example for the question Angular2 Final: es2015.core.d.ts:17:14: Duplicate identifier 'PropertyKey'-angular.js.
Read more >
Ngbmodel Error Typeerror: "This._Modalstack Is Undefined"
Because the components and templates provided by Angular cannot be the type of compilation JIT or AOT depends on the value of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found