Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaflet 1.9.1 breaks leaflet-draw #8521

Closed
4 tasks done
rmja opened this issue Oct 4, 2022 · 1 comment
Closed
4 tasks done

Leaflet 1.9.1 breaks leaflet-draw #8521

rmja opened this issue Oct 4, 2022 · 1 comment
Labels
bug needs triage Triage pending

Comments

@rmja
Copy link

rmja commented Oct 4, 2022

Checklist

  • I've looked at the documentation to make sure the behavior isn't documented and expected.
  • I'm sure this is an issue with Leaflet, not with my app or other dependencies (Angular, Cordova, React, etc.).
  • I've searched through the current issues to make sure this hasn't been reported yet.
  • I agree to follow the Code of Conduct that this project adheres to.

Steps to reproduce

See this issue on stack overflow: https://stackoverflow.com/questions/73893516/error-export-draw-imported-as-l-was-not-found-in-leaflet

mkdir leaflet-bug
cd leaflet-bug
npm init
npm i leaflet leaflet-draw
npm i --save-dev webpack webpack-cli @types/leaflet
mkdir src
cat << EOF > src/index.js
import "leaflet-draw";
import { Draw } from 'leaflet';
new Draw.Circle();
EOF
node_modules/.bin/webpack

It will produce the following webpack warning:

export 'Draw' (imported as 'Draw') was not found in 'leaflet' (possible exports: Bounds, Browser, CRS, Canvas, Circle, CircleMarker, Class, Control, DivIcon, DivOverlay, DomEvent, DomUtil, Draggable, Evented, FeatureGroup, GeoJSON, GridLayer, Handler, Icon, ImageOverlay, LatLng, LatLngBounds, Layer, LayerGroup, LineUtil, Map, Marker, Mixin, Path, Point, PolyUtil, Polygon, Polyline, Popup, PosAnimation, Projection, Rectangle, Renderer, SVG, SVGOverlay, TileLayer, Tooltip, Transformation, Util, VideoOverlay, bind, bounds, canvas, circle, circleMarker, control, default, divIcon, extend, featureGroup, geoJSON, geoJson, gridLayer, icon, imageOverlay, latLng, latLngBounds, layerGroup, map, marker, noConflict, point, polygon, polyline, popup, rectangle, setOptions, stamp, svg, svgOverlay, tileLayer, tooltip, transformation, version, videoOverlay)

I believe this is related to #8329

Expected behavior

leaflet-draw should work with leaflet 1.9.1

Current behavior

One has to fix the leaflet version to 1.8.0 to work with leaflet-draw.

Minimal example reproducing the issue

No response

Environment

  • Leaflet version: 1.9.1
  • Browser (with version): any
  • OS/Platform (with version): both

webpack 5.74

@rmja rmja added bug needs triage Triage pending labels Oct 4, 2022
@mourner
Copy link
Member

mourner commented Oct 4, 2022

Duplicate of #8451. We're releasing v1.9.2 today that will address this.

@mourner mourner closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Triage pending
Projects
None yet
Development

No branches or pull requests

2 participants