angular-custom-modal icon indicating copy to clipboard operation
angular-custom-modal copied to clipboard

error NG6002: 'ModalModule' does not appear to be an NgModule class in Angular 16 upgrade

Open ChandrakalaGrm opened this issue 1 year ago • 4 comments

Hi Zurfyx, I've been using angular-custom-modal for my Angular projects, however today, when upgrading to Angular 16, it is showing the below error in the while compiling the code and it is blocked to upgrade our project to Angular 16 migration.

error NG6002: 'ModalModule' does not appear to be an NgModule class.

8 ModalModule, ~~~~~~~~~~~

node_modules/angular-custom-modal/modal.module.d.ts:1:22 1 export declare class ModalModule { ~~~~~~~~~~~ This likely means that the library (angular-custom-modal) which declares ModalModule 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.

Could you please help how to fix this issue?

Thanks in Advance.

ChandrakalaGrm avatar Jul 24 '23 06:07 ChandrakalaGrm

Hi @zurfyx, @niesteszeck,

Could you suggest the above issue.

ChandrakalaGrm avatar Jul 24 '23 06:07 ChandrakalaGrm

Same on my side. Any updates on it?

mh4ck avatar Sep 15 '23 14:09 mh4ck

Just add "enableIvy": false, in your tsconfig.app.json and served my app again and it works.

But this package is definitely not updated anymore (I think) you should check for custom approach

jc-noodev avatar Jan 16 '24 01:01 jc-noodev

I recently needed to update an old project to work with the latest version of Angular, and got this issue. I pulled the project, updated the packages, modified the SCSS, and rebuilt the package. Everything seems to be working so far.

image

I’m using a workspace to load the module, which I copied from the build's dist folder. The project has been forked to https://github.com/malebolgia/angular-custom-modal, and the _dist build folder is included.

workspace package image image

app.module.ts image

malebolgia avatar Aug 21 '24 02:08 malebolgia