runette / ngx-leaflet-fullscreen

Angular wrapper for the leaflet-fullscreen control
MIT License
6 stars 1 forks source link

Module leaflet has no exported member FullscreenOptions #3

Closed Chistianxfp closed 2 years ago

Chistianxfp commented 2 years ago

Hello. Im triying to install with "npm install --legacy-peer-deps @runette/ngx-leaflet-fullscreen" due to dependencies errors but i'm allways getting this error:

**Error: node_modules/@runette/ngx-leaflet-fullscreen/lib/ngx-leaflet-fullscreen.component.d.ts:2:24 - error TS2305: Module '"leaflet"' has no exported member 'FullscreenOptions'.

2 import { Map, Control, FullscreenOptions } from 'leaflet';



Error: node_modules/@runette/ngx-leaflet-fullscreen/lib/ngx-leaflet-fullscreen.component.d.ts:7:22 - error TS2694: Namespace '"........./node_modules/@types/leaflet/index".Control' has no exported member 'Fullscreen'.

7     control: Control.Fullscreen;**

I tried installing "npm install @runette/leaflet-fullscreen" and "npm install --save @types/leaflet.fullscreen" before ngx-leaflet-fullscreen bur error stills appearing.

Angular CLI: 13.1.2
Node: 12.21.0
Package Manager: npm 7.20.1

Thank you for your time.
runette commented 2 years ago

Try adding the following line as the first line of the component .ts script

/// <reference types='@runette/leaflet-fullscreen' />

That should do the tick.

codemonkeyneo commented 2 years ago

Had same issue and installing

npm install @runette/leaflet-fullscreen

Sorts that out :)

Chistianxfp commented 2 years ago

Had same issue and installing

npm install @runette/leaflet-fullscreen

Sorts that out :)

This solved the problem. Thank you!!