bluehalo / ngx-leaflet-markercluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node_modules/@types/leaflet/index"' has no exported member 'MarkerClusterGroup'

texarr opened this issue · comments

Hi,

Its still issue there. I have added @typings and all packages from readme

env:

Angular CLI: 9.0.7
Node: 14.4.0
OS: win32 x64

Angular: 9.0.7
... 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.7
@angular-devkit/build-angular     0.900.7
@angular-devkit/build-optimizer   0.900.7
@angular-devkit/build-webpack     0.900.7
@angular-devkit/core              9.0.7
@angular-devkit/schematics        9.0.7
@angular/cdk                      9.1.3
@ngtools/webpack                  9.0.7
@schematics/angular               9.0.7
@schematics/update                0.900.7
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2

angular.json

"architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": { ...
            ],
            "styles": [ ...
              "node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css",

package.json

dependencies: [
  "@asymmetrik/ngx-leaflet": "^8.1.0",
  "@asymmetrik/ngx-leaflet-markercluster": "^5.0.0",
  "@types/leaflet": "^1.5.19",
  "@types/leaflet.markercluster": "^1.4.3",
  "leaflet": "^1.7.1",
  "leaflet.markercluster": "^1.4.1",
]

I have also checked the @types/leaflet/index directive if it have those 'MarkerClusterGroup' and it's missing.
If You see something wrong here please let me know.

Regards

Yep same issue. The type definitions are located in @types/leaflet.markercluster but importing this module after the import * as L from 'leaflet' has no effect. It is also not possible to import * as L from 'leaflet.markercluster'; if you do this, it is worse, and Typescript finds neither the base leaflet nor the markercluster definitions. So I'm pretty stumped. 🤷‍♂️

In our case this only started happening after updating all of our dependencies (including leaflet) to the latest versions during an Angular update.

Is there any update on this?
We are still having this trouble when running tests with Jest in Angular 13 with ngx-leaflet-markcluster@13.0.1.

The demo I use to verify was working when I made the ng13 update. I can take a look when I get a chance and make sure things are working as expected.