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 managed to install node.js and npm, and do npm install --save leaflet.geosearch
(with a few errors)
But what now? How can I use it? What language is this?
Typing this directly into the html code surely didn't work. import { OpenStreetMapProvider } from 'leaflet-geosearch';
I was expecting something along the lines of:
<script src="leaflet-geosearch.js"></script>
Maybe this script is beyond my capacity?
The text was updated successfully, but these errors were encountered:
There's something I don't understand: if npm is the "node package manager", and node was made to run js on server-side, it does not mean that code installed with npm is run exclusively on the server side ?
Thanks
@pierreloicq , yes, npm is short for node package manager, but pretty much all javascript libraries, regardless of front or backend are hosted there.
Bower deprecated itself in favor of npm, and I don't know of any other serious alternatives either.
npm itself, is indeed not a browser tool. It runs on your system, and you'll probably want to combine it locally with a bundler. The result of bundling is just javascript though. So unless you're using specific non-browser api's (such as filesystem calls), it will run perfectly fine in the browser.
Anyway, if you don't want to use npm, it's still possible to load it from a can (unpkg.com)
How do you install this thing for a total newbie?
I managed to install node.js and npm, and do
npm install --save leaflet.geosearch
(with a few errors)
But what now? How can I use it? What language is this?
Typing this directly into the html code surely didn't work.
import { OpenStreetMapProvider } from 'leaflet-geosearch';
I was expecting something along the lines of:
<script src="leaflet-geosearch.js"></script>Maybe this script is beyond my capacity?
The text was updated successfully, but these errors were encountered: