ngx-modialog: AOT compilation error using Angular4
I am using version 3.0.1 of the package with Angular 4. I am getting the following error when trying to build my app using aot:

The problem seems to be with the import of angular2-modal/plugins/bootstrap
Have anyone encoutered it before? Any solutions?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 4
- Comments: 21 (5 by maintainers)
@stevie6410 How’s the example coming along? Shall I set one up?
Thanks @DavidMaza I can confirm that after updating all my angular dependencies to version 4.2.6 (latest) the problem disappeared.
@shlomiassaf I am closing this issue
I’ll try and extract into an example.
After ejecting and using the exact same version of ngtools/webpack (1.4.2). I’m getting the same thing so I don’t think it’s a version issue.
ERROR in .../web/aot/node_modules/angular2-modal/plugins/bootstrap/src/angular2-modal-bootstrap.ng-flat.ngfactory.ts (10,26): Cannot find module '../../../../../../angular2-modal/plugins/bootstrap'.It’s still trying to find it in /web/angular2-modal instead of web/node_modules/angular2-modal. I’ll carry on investigating.
@kadosh1000 No. When I set the --aot=false it builds fine, but without this it has the same errors as you.
@fatters I am indeed using webpack. @stevie6410 it also works in my project when I don’t use AOT, is your build succesfull without that flag?