Can't import leaflet-ant-path

hi there . I was installed dependencies for leaflet-ant-path by this line npm:

 npm install --save leaflet-ant-path 

after that when I Import using import { antPath } from ‘leaflet-ant-path’; command . after all when I run program some issues occured and when I Inspect browser bellow errors appear:

So How Can I Resolve this

I just tested this and it worked for me.

Do you definitely have ember-auto-import in your package.json? That is necessary to support importing directly from NPM like this.

Do you have leaflet as well? It’s a necessary peerDep of leaflet-ant-path.

1 Like

tnx for good replies . it done but one issue:

Above error exist with this configuration

var polyline = L.polyline(latlng).addTo(maps);

    let antPolyline = new L.polyline.AntPath(latlng, {

        "paused": false,     

        "reverse": false,  

        "delay": 3000,    

        "dashArray": [10, 20], 

        "weight": 5,    

        "opacity": 0.5,  

        "color": "#0000FF", 

        "pulseColor": "#FFFFFF"