Closed GertjanJ closed 3 years ago
70% building 588/588 modules 0 active
ERROR in node_modules/ngx-jsonapi/ngx-jsonapi.module.d.ts:4: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-jsonapi) which declares NgxJsonapiModule 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.
Oke so after a lot of searching I found out that there is this thing called ngcc (Angular compatibility compiler). It converts non-ivy libraries into packages ivy can work with.
When adding "postinstall": "ngcc" to scripts in package.json then after each npm install/ng add, all non-ivy packages will be converted. Including this one.
"scripts": {
"postinstall": "ngcc"
}
Package looks very promising! Only thing is that I can't use the package with Angular 11. When importing this module the following error appears: