>PROBLEM
Angular compilation throws the following error:
Error: node_modules/ngx-bootstrap/modal/bs-modal.service.d.ts:7:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
This likely means that the library (ngx-bootstrap/modal) which declares BsModalService has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
>SOLUTION
>BEFORE (WRONG)
imports: [
BsModalService,
],
providers: [
],
>AFTER (RIGHT)
imports: [
BsModalService,
],
providers: [
BsModalService,
],
>ENV
Angular CLI: 13.2.2
Node: 16.13.1
Package Manager: npm 8.5.4
OS: win32 x64
No comments:
Post a Comment