Error when update leaflet-geosearch version

Hi everyone,

I updated the leaflet-geosearch plugin version in my project from 2.7.0 to 3.6.1. I followed the guide GitHub - smeijer/leaflet-geosearch: A geocoding/address-lookup library supporting various api providers. but it didn’t work, I get this error when implementing ‘const searchControl = new GeoSearchControl’:

“Only a void function can be called with the ‘new’ keyword.ts(2350)”

What can I do in this case? Can anyone help?

Thanks