Skip to content

Type issues after upgrading from 8.1.0 to 14.0.1 #130

Open
@patolax

Description

After upgrading to angular v14 we also tried to upload @asymmetrik and leaflet. But we get so many errors related to type. See below for the error list and all the packages we use in our project.
How can we resolve this?

Error: node_modules/@asymmetrik/ngx-leaflet-draw/lib/core/leaflet-draw.directive.d.ts:2:19 - error TS2305: Module '"leaflet"' has no exported member 'DrawEvents'.

2 import { Control, DrawEvents } from 'leaflet';
                    ~~~~~~~~~~


Error: node_modules/@asymmetrik/ngx-leaflet-draw/lib/core/leaflet-draw.directive.d.ts:9:26 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index".Control' has no exported member 'Draw'.

9     drawControl: Control.Draw;
                           ~~~~


Error: node_modules/@asymmetrik/ngx-leaflet-draw/lib/core/leaflet-draw.directive.d.ts:10:26 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index".Control' has no exported member 'DrawConstructorOptions'.

10     drawOptions: Control.DrawConstructorOptions;
                            ~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/@asymmetrik/ngx-leaflet-draw/lib/core/leaflet-draw.directive.d.ts:12:37 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index".Control' has no exported member 'Draw'.

12     drawReady: EventEmitter<Control.Draw>;
                                       ~~~~


Error: node_modules/@asymmetrik/ngx-leaflet-draw/lib/core/leaflet-draw.directive.d.ts:32:31 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index".Control' has no exported member 'Draw'.

32     getDrawControl(): Control.Draw;
                                 ~~~~


Error: node_modules/@asymmetrik/ngx-leaflet-markercluster/lib/leaflet-markercluster.directive.d.ts:8:27 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'MarkerClusterGroup'.

8     markerClusterGroup: L.MarkerClusterGroup;
                            ~~~~~~~~~~~~~~~~~~


Error: node_modules/@asymmetrik/ngx-leaflet-markercluster/lib/leaflet-markercluster.directive.d.ts:10:29 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'MarkerClusterGroupOptions'.

10     markerClusterOptions: L.MarkerClusterGroupOptions;
                               ~~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/@asymmetrik/ngx-leaflet-markercluster/lib/leaflet-markercluster.directive.d.ts:11:40 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'MarkerClusterGroup'.

11     markerClusterReady: EventEmitter<L.MarkerClusterGroup>;
                                          ~~~~~~~~~~~~~~~~~~


Error: src/app/features/map-management/map-design/leaflet-map-design/leaflet-map-design.component.ts:69:3 - error TS2339: Property 'Edit' does not exist on type 'typeof import("C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index")'.

69 L.Edit.PolyVerticesEdit = L.Edit.PolyVerticesEdit.extend({
     ~~~~


Error: src/app/features/map-management/map-design/leaflet-map-design/leaflet-map-design.component.ts:69:29 - error TS2339: Property 'Edit' does not exist on type 'typeof import("C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index")'.

69 L.Edit.PolyVerticesEdit = L.Edit.PolyVerticesEdit.extend({
                               ~~~~


Error: src/app/features/map-management/map-design/leaflet-map-design/leaflet-map-design.component.ts:79:3 - error TS2339: Property 'EditToolbar' does not exist on type 'typeof import("C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index")'.

79 L.EditToolbar.Delete.include({
     ~~~~~~~~~~~


Error: src/app/features/map-management/map-design/leaflet-map-design/leaflet-map-design.component.ts:179:26 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index".Control' has no exported member 'DrawConstructorOptions'.

179   drawOptions: L.Control.DrawConstructorOptions = {
                             ~~~~~~~~~~~~~~~~~~~~~~


Error: src/app/features/map-management/map-design/leaflet-map-design/leaflet-map-design.component.ts:753:15 - error TS2339: Property 'mousePosition' does not exist on type 'typeof control'.

753     L.control.mousePosition({
                  ~~~~~~~~~~~~~


Error: src/app/features/map-management/map-design/leaflet-map-design/leaflet-map-design.component.ts:765:41 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'DrawEvents'.

765     leafletMap.on('draw:created', (e: L.DrawEvents.Created) => {
                                            ~~~~~~~~~~


Error: src/app/features/map-management/map-design/leaflet-map-design/leaflet-map-design.component.ts:775:43 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'DrawEvents'.

775     leafletMap.on('draw:editstart', (e: L.DrawEvents.EditStart) => {
                                              ~~~~~~~~~~


Error: src/app/features/map-management/map-design/leaflet-map-design/leaflet-map-design.component.ts:787:40 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'DrawEvents'.

787     leafletMap.on('draw:edited', (e: L.DrawEvents.Edited) => {
                                           ~~~~~~~~~~


Error: src/app/features/map-management/map-design/leaflet-map-design/leaflet-map-design.component.ts:797:42 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'DrawEvents'.

797     leafletMap.on('draw:editstop', (e: L.DrawEvents.EditStop) => {
                                             ~~~~~~~~~~


Error: src/app/features/map-management/map-design/leaflet-map-design/leaflet-map-design.component.ts:806:45 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'DrawEvents'.

806     leafletMap.on('draw:deletestart', (e: L.DrawEvents.DeleteStart) => {
                                                ~~~~~~~~~~


Error: src/app/features/map-management/map-design/leaflet-map-design/leaflet-map-design.component.ts:815:41 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'DrawEvents'.

815     leafletMap.on('draw:deleted', (e: L.DrawEvents.Deleted) => {
                                            ~~~~~~~~~~


Error: src/app/features/map-management/map-design/leaflet-map-design/leaflet-map-design.component.ts:826:44 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'DrawEvents'.

826     leafletMap.on('draw:deletestop', (e: L.DrawEvents.DeleteStop) => {
                                               ~~~~~~~~~~


Error: src/app/features/map-management/map-design/leaflet-map-design/leaflet-map-design.component.ts:835:43 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'DrawEvents'.

835     leafletMap.on('draw:drawstart', (e: L.DrawEvents.DeleteStop) => {
                                              ~~~~~~~~~~


Error: src/app/features/map-management/map-design/leaflet-map-design/leaflet-map-design.component.ts:842:42 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'DrawEvents'.

842     leafletMap.on('draw:drawstop', (e: L.DrawEvents.DeleteStop) => {
                                             ~~~~~~~~~~


Error: src/app/features/map/leaflet-map/leaflet-map.component.ts:112:24 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'MarkerClusterGroup'.

112   assetClusterGroup: L.MarkerClusterGroup;
                           ~~~~~~~~~~~~~~~~~~


Error: src/app/features/map/leaflet-map/leaflet-map.component.ts:127:21 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'MarkerClusterGroupOptions'.

127   clusterOptions: L.MarkerClusterGroupOptions;
                        ~~~~~~~~~~~~~~~~~~~~~~~~~


Error: src/app/features/map/leaflet-map/leaflet-map.component.ts:570:30 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'MarkerClusterGroup'.

570   assetClusterReady(group: L.MarkerClusterGroup) {
                                 ~~~~~~~~~~~~~~~~~~


Error: src/app/features/map/leaflet-map/leaflet-map.component.ts:643:7 - error TS2339: Property 'MarkerClusterGroup' does not exist on type 'typeof import("C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index")'.

643     L.MarkerClusterGroup.mergeOptions({
          ~~~~~~~~~~~~~~~~~~


Error: src/app/features/map/leaflet-map/leaflet-map.component.ts:645:48 - error TS2694: Namespace '"C:/Users/jlo/source/repos/map-project/node_modules/@types/leaflet/index"' has no exported member 'MarkerClusterGroup'.

645       iconCreateFunction: function (cluster: L.MarkerClusterGroup) {
                                               ~~~~~~~~~~~~~~~~~~

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions