+// private boolean checkIfInstalled(String module) throws Exception {
+// String tileserverMapnik = tileserverMapnikRoot().toString();
+// int retVal;
+// try (ByteArrayOutputStream output = new ByteArrayOutputStream()) {
+// if (module == null) {
+// retVal = NodeJS.npm(output, "--prefix", tileserverMapnik, "list");
+// } else {
+// retVal = NodeJS.npm(output, "--prefix", tileserverMapnik, "list", module);
+// }
+// String outputString = new String(output.toByteArray(), StandardCharsets.UTF_8);
+// }
+// return retVal == 0;
+// }
+//
+// private int install(String module, Optional<TileserverStartListener> listener) throws Exception {
+// String tileserverMapnik = tileserverMapnikRoot().toString();
+// int retVal;
+// if (module == null) {
+// listener.ifPresent(l -> l.installing("Installing tileserver-mapnik"));
+// retVal = NodeJS.npm(null, "--prefix", tileserverMapnik, "install", "--save");
+// } else {
+// retVal = NodeJS.npm(null, "--prefix", tileserverMapnik, "install", module, "--save");
+// }
+// if (retVal != 0)
+// LOGGER.warn("Could not install module " + module == null ? "package.json" : module + "! " + retVal);
+// return retVal;
+// }
+//
+// private boolean checkAndInstall(String module, Optional<TileserverStartListener> listener) throws Exception {
+// LOGGER.info("Installing module {}", String.valueOf(module));
+// boolean installed = checkIfInstalled(module);
+// if (!installed) {
+// int installSuccessfull = install(module, listener);
+// if (installSuccessfull != 0) {
+// LOGGER.warn("Installation of module {} failed!", String.valueOf(module));
+// listener.ifPresent(l -> l.installationFailed(module, installSuccessfull));
+// }
+// } else {
+// LOGGER.info("Module {} was already installed", String.valueOf(module));
+// }
+// return !installed;
+// }