emilhe / dash-leaflet

MIT License
213 stars 37 forks source link

ERROR regeneratorRuntime is not defined #44

Closed verstraetejonas closed 3 years ago

verstraetejonas commented 4 years ago

Thanks for this great package. When using geojson I got an error 'regeneratorRuntime is not defined'. According to https://github.com/babel/babel/issues/9849#issuecomment-487040428 it could be fixed by importing regeneratorRuntime from "regenerator-runtime".

emilhe commented 4 years ago

Thanks! What version are you on?

verstraetejonas commented 4 years ago

version 0.1.3

emilhe commented 4 years ago

Could you post an MWE? The documentation,

http://dash-leaflet.herokuapp.com/

Is running with 0.1.3 also (and Dash 1.16.0), and there i don't see the error.

wolfiex commented 3 years ago

What was the found solution to this?

Mac OS python 3.8.5 Opera dash leaflet 0.1.13

Culprit code:

            ll = dlx.dicts_to_geojson([dict(lat=-37.8, lon=175.6)]*4)

            markers = dl.GeoJSON(data=ll, cluster=True, zoomToBoundsOnClick=True,
                   # superClusterOptions={"radius": 100}
                   )

Error Trace

regeneratorRuntime is not defined
22:38:18
(This error originated from the built-in JavaScript code that runs Dash apps. Click to see the full stack trace or open your browser's console.)
ReferenceError: regeneratorRuntime is not defined

    at _assembleGeojson (webpack-internal:///./src/lib/utils.js:52:54)

    at assembleGeojson (webpack-internal:///./src/lib/utils.js:48:27)

    at LeafletGeoJSON._setData (webpack-internal:///./src/lib/LeafletGeoJSON.js:181:69)

    at LeafletGeoJSON.componentDidMount (webpack-internal:///./src/lib/LeafletGeoJSON.js:110:12)

    at commitLifeCycles (http://127.0.0.1:8050/_dash-component-suites/dash_renderer/react-dom@16.v1_1_2m1576595738.8.6.js:17469:22)

    at commitAllLifeCycles (http://127.0.0.1:8050/_dash-component-suites/dash_renderer/react-dom@16.v1_1_2m1576595738.8.6.js:18871:7)

    at HTMLUnknownElement.callCallback (http://127.0.0.1:8050/_dash-component-suites/dash_renderer/react-dom@16.v1_1_2m1576595738.8.6.js:143:14)

    at Object.invokeGuardedCallbackDev (http://127.0.0.1:8050/_dash-component-suites/dash_renderer/react-dom@16.v1_1_2m1576595738.8.6.js:193:16)

    at invokeGuardedCallback (http://127.0.0.1:8050/_dash-component-suites/dash_renderer/react-dom@16.v1_1_2m1576595738.8.6.js:250:31)

    at commitRoot (http://127.0.0.1:8050/_dash-component-suites/dash_renderer/react-dom@16.v1_1_2m1576595738.8.6.js:19083:7)
wolfiex commented 3 years ago

It seems it may possibly be a version with dash itself. https://github.com/plotly/dash/issues/1087

Solved by using dash 1.18.0 instead of 19