user2038538
user2038538

Reputation: 231

Migration issue Angular 7 to 9

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

Upvotes: 4

Views: 5927

Answers (1)

Chaitanya Babar
Chaitanya Babar

Reputation: 289

As per angular upgrade docs here

enter image description 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.

enter image description here

You should follow below commands

npm un angular-webstorage-service --save
npm i ngx-webstorage-service --save 

This should resolve the issue.

Upvotes: 10

Related Questions