Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 796
user2038538 Avatar asked Jan 01 '23 06:01

user2038538


1 Answers

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.

like image 100
Chaitanya Babar Avatar answered Jan 06 '23 03:01

Chaitanya Babar