ngx-bootstrap: Error: Cannot resolve type entity i4.FocusTrapModule to symbol
importing ModalModule.forRoot() gives the below error on starting the server in angular 18
✘ [ERROR] Angular compilation initialization failed. [plugin angular-compiler]
Error: Cannot resolve type entity i4.FocusTrapModule to symbol
Versions of ngx-bootstrap, Angular, and Bootstrap:
“@angular/core”: “^18.0.6”, “bootstrap”: “^5.3.3”, “ngx-bootstrap”: “^18.0.0”,
Build system: Angular CLI
Expected behavior
Server should start without any error
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (5 by maintainers)
@vignesh-s @evil-o @PShonda thank you all on the intel. So far I think I found the issue, could you please try it as well. In your tsconfig.json
"compilerOptions": { ... "moduleResolution": "node", ... }Does work on @evil-o sample. I also found your solution as well @PShonda , unfortunatelly this is definitely not a lasting one.
@salartaimoor10 this is the answer
@slubowsky you are right, it’s very unfortunate, but whole library builds as node now, so that is the best solution we could offer right now. We’re restarting our opensource contributions, and chances are we’ll get to this issue as well.