SamSamskies / react-map-gl-geocoder

React wrapper for mapbox-gl-geocoder for use with react-map-gl
MIT License
123 stars 29 forks source link

"Could not find a declaration file for module 'react-map-gl-geocoder'" #83

Closed appaollo closed 3 years ago

appaollo commented 3 years ago

Hello team,

I wanted to add a Geocoder feature on top of my react-map-gl app. But after following the steps on the main page (i.e npm install 'react-map-gl-geocoder' & importing 'react-map-gl-geocoder/dist/mapbox-gl-geocoder.css')nothing appeared on the screen and I came across the following:

_Could not find a declaration file for module 'react-map-gl-geocoder'. '[...]/nodemodules/react-map-gl-geocoder/dist/index.js' implicitly has an 'any' type. Try npm install @types/react-map-gl-geocoder if it exists or add a new declaration (.d.ts) file containing declare module 'react-map-gl-geocoder';ts(7016)

I tried the first option suggested but it didn't work. And as regards the second option I'm unsure what to do and how to do it, can someone please help me?

Apologies if it had already been answered & thanks in advance for your help!

SamSamskies commented 3 years ago

Hi @Maledbao, please check out https://github.com/SamSamskies/react-map-gl-geocoder/issues/50

appaollo commented 3 years ago

Thank you very much, will check it out !