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
Error installing *any plugin* with master version (with Docker) #302
Comments
plugins management through kosmtik is deprecated (the
|
This way the installation does not fail, but the plugins are not loaded. Example:
Output:
kosmtik-map-compare is not loaded. How can this be fixed? |
Yes, that's an issue. Kosmtik used to have an internal command to install and register plugins, but In the file
And so on. |
@yohanboniface, thanks a lot! This works with Ubuntu 20.04.2 LTS (for testing openstreetmap-carto): # Install nodejs:
sudo apt install -y nodejs npm
# Install kosmtik:
sudo npm install --unsafe-perm -g git+https://github.com/kosmtik/kosmtik
# Install kosmtik plugins:
sudo npm install -g leaflet
sudo npm install -g leaflet-editinosm
sudo npm install -g leaflet.photon
sudo npm install -g osmtogeojson
# Plugins that should work:
sudo npm install -g git+https://github.com/kosmtik/kosmtik-overpass-layer # Add overpass layers to your Kosmtik project
sudo npm install -g git+https://github.com/kosmtik/kosmtik-fetch-remote # Kosmtik plugin to fetch remote layer data
sudo npm install -g git+https://github.com/kosmtik/kosmtik-overlay # Add an overlay in Kosmtik
sudo npm install -g git+https://github.com/kosmtik/kosmtik-map-compare # Add a map to compare side-by-side with your work in Kosmtik
sudo npm install -g git+https://github.com/kosmtik/kosmtik-osm-data-overlay # Display OSM data on top of your map in Kosmtik.
sudo npm install -g git+https://github.com/kosmtik/kosmtik-tiles-export # Export tiles tree of your Kosmtik map
sudo npm install -g git+https://github.com/kosmtik/kosmtik-deploy # Deploy your Kosmtik project on a remote server
sudo npm install -g git+https://github.com/kosmtik/kosmtik-mapnik-reference # Browse Mapnik and CartoCSS reference in Kosmtik; needs --mapnik-version 3.0.20
sudo npm install -g git+https://github.com/kosmtik/kosmtik-open-in-josm # Add a control in Kosmtik to open your favorite OSM editor with the current
sudo npm install -g git+https://github.com/kosmtik/kosmtik-geojson-overlay # Show a geojson overlay on top of your Kosmtik map
sudo npm install -g git+https://github.com/kosmtik/kosmtik-place-search # Search control for Kosmtik
# Plugins that might not work:
sudo npm install -g git+https://github.com/kosmtik/kosmtik-magnacarto # Magnacarto renderer support for Kosmtik
sudo npm install -g git+https://github.com/kosmtik/kosmtik-mbtiles-export # Export your Kosmtik project in MBTiles
sudo npm install -g git+https://github.com/kosmtik/kosmtik-mbtiles-source # Use an MBTiles file as a source for a vector tile based probject in kosmtik
sudo npm install -g git+https://github.com/kosmtik/kosmtik-places # Bookmark places in Kosmtik
# Activate plugins:
mkdir -p /home/$USER/.config
cat > /home/$USER/.config/kosmtik.yml <<\eof
plugins:
# Plugins that should work:
- kosmtik-fetch-remote
- kosmtik-geojson-overlay
- kosmtik-map-compare
- kosmtik-overlay
- kosmtik-overpass-layer
- kosmtik-tiles-export
- kosmtik-deploy
- kosmtik-mapnik-reference # this needs --mapnik-version 3.0.20
- kosmtik-open-in-josm # this only works locally
- kosmtik-osm-data-overlay
- kosmtik-place-search
# Plugins that might not work:
#- kosmtik-magnacarto
#- kosmtik-mbtiles-export
#- kosmtik-places
#- kosmtik-mbtiles-source
eof
# Test installation:
kosmtik version
# Run Kosmtik:
kosmtik serve project.mml --host 0.0.0.0 --mapnik-version 3.0.20 |
Thanks a lot. I guess this should find its place in the readme, or at least a link to it. I would never have managed without it. |
I found a working Docker version of kosmtik 0.0.16 : https://hub.docker.com/r/joxit/kosmtik/dockerfile
But I want to have a working version of the master version (which uses a newer Mapnik version).
I do the following to install it:
RUN apt-get update
&& apt-get install -y --no-install-recommends curl ca-certificates gpg
&& curl -sL https://deb.nodesource.com/setup_6.x | bash -
&& apt-get install -y nodejs
&& curl -sL https://github.com/kosmtik/kosmtik/archive/master.tar.gz | tar xz --strip-components=1
&& npm install --production
&& node index.js plugins --install kosmtik-mbtiles-export
But the result is:
[Core] No usable config file found in /root/.config/kosmtik.yml
[Core] Loading plugin from ../plugins/base-exporters/index.js
[Core] Loading plugin from ../plugins/hash/index.js
[Core] Loading plugin from ../plugins/local-config/index.js
[Core] Loading plugin from ../plugins/datasource-loader/index.js
[Core] Starting installation of kosmtik-mbtiles-export
/opt/kosmtik/node_modules/npm/node_modules/bluebird/js/release/async.js:61
fn = function () { throw arg; };
^
TypeError: Cannot convert undefined or null to object
at /opt/kosmtik/src/back/PluginsManager.js:100:38
at tryCatcher (/opt/kosmtik/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
I would be interested to know if any of you is able to install any of the Known Plugins mentioned on github with the master version of kosmtik. And if so, what OS and version of node you are using
I am using:
OS: debian:stable
node: v6.16.0
npm: 3.10.10
The text was updated successfully, but these errors were encountered: