Error when using sourcemap for reporting an error

I am trying to build a react leaflet widget. Before, I used the dependency react-leaflet-control to easily add input elements or buttons to the map. This dependency is outdated so I replaced it with react-leaflet-custom-control. When trying to build I get this error: Error when using sourcemap for reporting an error: Can't resolve original location of error.   Does anyone know how to find the cause of this error? Or is there another good alternative for this dependency?   I am building in pluggable-widget-tools v9.24.1 and node v18.19.0.      
1 answers

Hi Ellen,

I also got the issue while building the widget, I found a workaround for resolving the error. 

Open the file which got error. In your case it is in "node_modules/react-leaflet-custom-control/lib/Control.js (1:15)" 

Scroll to the bottom of the file where you will find this source map line "# sourceMappingURL".

Remove that line, Save the file and build again.

I hope the above workaround helps.