Leaflet search-control not working in ionic


Currently in my ionic app the leaflet plugin is used. I want to use the leaflet-search plugin but I can’t get it to work.

I install the plugin with the command “npm install --save leaflet-search” but when I try to import the plugin with

import * as S from ‘leaflet-search’;

it tells me the following:

TS7016: Could not find a declaration file for module ‘leaflet-search’. ‘…/node_modules/leaflet-search/dist/leaflet-search.src.js’ implicitly has an ‘any’ type. Try npm install npm ‘install @types/leaflet-search’ if it exists or add a new declaration (.d.ts) file containing `declare module ‘leaflet-search’;

I have tried launching the command npm install @types/leaflet-search but i get the error 404

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types%2Fleaflet-search - Not found
npm ERR! 404
npm ERR! 404 ‘@types/leaflet-search@latest’ is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

How can I solve this issue?

thank you!

Best regard