You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use this with babel and ES6 notation. I have done npm install --save leaflet.coordinates and see the directory in my node_modules. When I try to do
import 'leaflet.coordinates'
from my script, babel gives me an error:
Error: Cannot find module 'leaflet.coordinates' from '/path/to/main.jsx'
If I copy Leaflet.Coordinates-0.1.5.src.js to my directory an do
import './leaflet.coordinates.jsx'
instead, then I am able to run babel and the component shows up on my map.
Comparing the package.json for leaflet and leaflet.coordinates, I see that leaflet has an entry for main which is missing. In fact, adding this line
"main": "dist/Leaflet.Coordinates-0.1.5.src.js",
to package.json let babel succeed.
The text was updated successfully, but these errors were encountered:
I have done " npm install --save leaflet.coordinates "
import 'leaflet.coordinates
then npm run dev ,but it is also gives me an error :
To install it, you can run: npm install --save leaflet.coordinates
why? i don't know how is it the error.
I am trying to use this with babel and ES6 notation. I have done
npm install --save leaflet.coordinates
and see the directory in my node_modules. When I try to dofrom my script, babel gives me an error:
If I copy
Leaflet.Coordinates-0.1.5.src.js
to my directory an doinstead, then I am able to run babel and the component shows up on my map.
Comparing the package.json for leaflet and leaflet.coordinates, I see that leaflet has an entry for
main
which is missing. In fact, adding this lineto package.json let babel succeed.
The text was updated successfully, but these errors were encountered: