I'm trying to migrate my application from 7 to 9, here the new IVY compiler in Angular 9 not compatible with library angular-webstorage-service throws below error.
ERROR in node_modules/angular-webstorage-service/src/storage-service.module.d.ts:9: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 (angular-webstorage-service) which declares StorageServiceModule has not been processed correctly by s not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer versio update if so. Also consider checkn 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.
Any ideas for Angular 9 compatability
As per angular upgrade docs here
So during the angular version upgrade the dependencies should be updated so they are compatible for the upgraded version of angular.
The reason for the error is npm library angular-webstorage-service is not compatible for angular version 9.0.1.
As per angular-webstorage-service docs here the ngx-webstorage-service is compatible for angular 9.
You should follow below commands
npm un angular-webstorage-service --save
npm i ngx-webstorage-service --save
This should resolve the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With