maptiler / tileserver-gl

Vector and raster maps with GL styles. Server side rendering by MapLibre GL Native. Map tile server for MapLibre GL JS, Android, iOS, Leaflet, OpenLayers, GIS via WMTS, etc.
https://tileserver.readthedocs.io/en/latest/
Other
2.24k stars 639 forks source link

tileserver-gl Module Not Found Error #1308

Closed akram-mhss closed 4 months ago

akram-mhss commented 4 months ago

Hello,

I am encountering an issue while trying to run tileserver-gl on a server without internet access. I have successfully set up tileserver-gl on other servers using a prepared folder with all necessary files, but on this particular server, I receive the following error:

`C:\Users\andreas\Desktop\map> npx tileserver-gl --mbtiles africa.mbtiles

node:internal/modules/cjs/loader:1340 return process.dlopen(module, path.toNamespacedPath(filename)); Error: Le module spécifié est introuvable. \?\C:\Users\andreas\Desktop\map\node_modules@maplibre-gl-native\lib\node-v108\mbgl.node at Module._extensions..node (node:internal/modules/cjs/loader:1340:18) at Module.load (node:internal/modules/cjs/loader:1119:32) at Module._load (node:internal/modules/cjs/loader:960:12) at Module.require (node:internal/modules/cjs/helpers:107:18) at require (node:internal/modules/cjs/helpers:132:18) at Object. (C:\Users\andreas\Desktop\map\node_modules@maplibre-gl-native\platform\node\index.js:5:12) at Module._compile (node:internal/modules/cjs/loader:1255:14) at Module._extensions..js (node:internal/modules/cjs/loader:1309:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Module._load (node:internal/modules/cjs/loader:960:12) { code: 'ERR_DLOPEN_FAILED' } Node.js v18.18.1`

i have already make the tileserver-gl work in server 2022 -> https://github.com/maptiler/tileserver-gl/issues/1020

acalcutt commented 4 months ago

Could it be you prepared it on a different version of node? Do you have node_modules\@maplibre-gl-native\lib\node-v108\mbgl.node in your folder or is the 'node-v108' a different version

akram-mhss commented 4 months ago

No is the same node V18.18.1 u can see the post #1020

acalcutt commented 4 months ago

And the file does exist there at node_modules\maplibre-gl-native\lib\node-v108\mbgl.node?

One other thing on windows is you need the C++ reditributable. maybe the version on that particular server is out of date? I ran into an issue testing the current maplibre-native pre release where I had to update to the latest version or maplibre-native was failing silently. Maybe as a precaution make sure you have the latest from https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-microsoft-visual-c-redistributable-version

akram-mhss commented 4 months ago

Thank you, It works perfectly now. Your help solved the problem. You're the best.

acalcutt commented 4 months ago

was it the c++ redistributable?

akram-mhss commented 4 months ago

yes