mojodna / tessera

A tilelive-based tile server.
BSD 2-Clause "Simplified" License
323 stars 80 forks source link

Failed to install tilelive-vector and tilelive-xray #105

Open jimbok8 opened 2 years ago

jimbok8 commented 2 years ago

I used this command npm install -g tilelive-vector tilelive-xray and got these errors

> mapnik@3.5.14 install C:\Users\JimKay\Programs\node-v10.24.1-win-x64\node_modules\tilelive-vector\node_modules\mapnik
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.5.14/Release/node-v93-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for mapnik@3.5.14 and node@16.14.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.5.14/Release/node-v93-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for mapnik@3.5.14 and node@16.14.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
gypgyp ERR! find VS
 gypERR!  find VS
mojodna commented 2 years ago

Are you using Node 10.x or 16.x? Can you tell which version of tilelive-vector it's trying to install? (I'm trying to repro

The underlying problem is that the mapnik@3.5.14 (which is now old; 4.5.9 is current) dependency of tilelive-vector doesn't have binaries for Node 16 on Windows (v93 = Node 16.x; see NODE_MODULE_VERSION).

It looks like installing @mapbox/tilelive-vector should work (where there's a 4.x that supports mapnik@4.5.9), but then tilelive-xray depends on the wrong module. I'll push a couple of fixes for this shortly.

mojodna commented 2 years ago

I misspoke. Just installing tilelive-xray (npm install -g tilelive-xray) should do the trick; it should install the correct version of tilelive-vector as a dependency, and if it doesn't, install @mapbox/tilelive-vector manually and you should be good to go.