leaflet-lasso icon indicating copy to clipboard operation
leaflet-lasso copied to clipboard

Issue with exports from the package after update to 2.2.13

Open Azbesciak opened this issue 1 year ago • 2 comments

Hi, after updating to 2.2.13 (from 2.2.12) I see in 2/2 projects the following error

Error: export 'LassoHandler' (imported as 'LassoHandler') was not found in 'leaflet-lasso' (module has no exports)

Error: export 'FINISHED_EVENT' (imported as 'FINISHED_EVENT') was not found in 'leaflet-lasso' (module has no exports)

Error: export 'FINISHED_EVENT' (imported as 'FINISHED_EVENT') was not found in 'leaflet-lasso' (module has no exports)

In type definitions I see these are exported, but maybe some config is invalid.

Azbesciak avatar Apr 09 '24 09:04 Azbesciak

Hi @Azbesciak, thanks for reporting. Could you explore what's the actual cause and send a PR, please? I'm sorry, but my availability is limited these days.

zakjan avatar Apr 14 '24 12:04 zakjan

The problem was introduced in 66b76fd8. I switched back to the commit before (5bf9f8fd), replaced files in my app's node_modules and it worked fine. My app is based on webpack and angular (17, but the same in 14 based app).

I spent some time on it, tried sugestion from https://github.com/facebook/create-react-app/issues/12674 and did not work. Also a couple of other changes in files, but... no results.

As I went through the declaration it looks all fine. I am not a low level node spec, rollup is also not my domain... but maybe it is because of the file format (there is no mjs, only cjs/esm/umd), but no clue. Adding system in rollup changed nothing. Maybe it is because of es declaration?

Azbesciak avatar May 02 '24 08:05 Azbesciak