runette / ngx-leaflet-fullscreen

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

"types/leaflet/index.js"' has no exported member FullscreenOptions error #2

Closed DoubyCz closed 3 years ago

DoubyCz commented 4 years ago

ERROR in node_modules/@runette/ngx-leaflet-fullscreen/lib/ngx-leaflet-fullscreen.component.d.ts:2:24

node_modules/@types/leaflet/index".Control' has no exported member 'Fullscreen'

runette commented 4 years ago

Have you tried putting

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

at the top of the component script as discussed in the article.

Also see the StackBlitz in that article for the reference implementation. That is definitely working.

mactep commented 3 years ago

In my case I had to run npm install @runette/leaflet-fullscreen to solve it. For some reason it wasn't installed together with the angular package.

runette commented 3 years ago

@mactep it is not installed with any angular package and you always have to run the npm install command

mactep commented 3 years ago

@runette then we should change the README. It states that this package installs that dependency. Sorry if I'm missing something.

runette commented 3 years ago

@mactep

Aha - got you. I was confused by the reference to 'angular package' which to my mind is a schematic.

The package.json definitely includes the dependency - so I am not sure why this would be so. If you want to add a PR to improve the documentation, I would happily accept it.

mactep commented 3 years ago

@runette I should've been clearer about it, sorry.

I did some testing in a new environment and i didn't need to install the dependency manually, just adding /// <reference types='@runette/leaflet-fullscreen' /> did it. I don't know what happened in my previous environment tho.

runette commented 3 years ago

@mactep I should have read your comment more clearly. When I get time - I will add some more about this issue in the README