Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class. #32

Open
rami-alloush opened this issue May 28, 2020 · 1 comment

Comments

@rami-alloush
Copy link

rami-alloush commented May 28, 2020

I've added the the package as documented. When I add the module to my module's import, I get the following error.

node_modules/@asymmetrik/ngx-leaflet-markercluster/dist/leaflet-markercluster/leaflet-markercluster.module.d.ts:2: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 (@asymmetrik/ngx-leaflet-markercluster) which declares LeafletMarkerClusterModule 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.

2 export declare class LeafletMarkerClusterModule {

Here's the output of my ng v

Angular CLI: 9.0.4
Node: 12.14.0
OS: win32 x64

Angular: 9.0.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.4
@angular-devkit/build-angular     0.900.4
@angular-devkit/build-optimizer   0.900.4
@angular-devkit/build-webpack     0.900.4
@angular-devkit/core              9.0.4
@angular-devkit/schematics        9.0.4
@angular/cdk                      9.1.2
@angular/fire                     6.0.0
@angular/google-maps              9.1.0
@ngtools/webpack                  9.0.4
@schematics/angular               9.0.4
@schematics/update                0.900.4
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2

Thanks

@reblace
Copy link
Contributor

reblace commented Jul 29, 2020

You may want to try the newer versions of the library that are ng9 and ng10 compatible. This issue was introduced when they upgraded to ng9 if libraries were not published with ivy disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants