Coder Social home page Coder Social logo

mapbox-tile-copy's Introduction

mapbox-tile-copy

A shortcut from local geodata files to tiles on S3 or to the local filesystem.

Build Status

Installation

$ npm install -g @mapbox/mapbox-tile-copy

Configuration

If writing to S3 you'll need to make sure that your shell environment is configured with appropriate credentials.

Usage

$ mapbox-tile-copy <file> <s3:// url template or file:// path>

Your s3 url template must include a {z}/{x}/{y} scheme for writing and distributing tiles. File extensions are not required.

Examples:

Copy tiles from an mbtiles file to a folder in my-bucket:

$ mapbox-tile-copy ~/data/my-tiles.mbtiles s3://my-bucket/folder/mbtiles/{z}/{x}/{y}

Copy tiles from an mbtiles file to a relative folder in the current working directory named 'tiles':

$ mapbox-tile-copy ~/data/my-tiles.mbtiles file://./tiles

Convert a GeoJSON file into vector tiles:

$ mapbox-tile-copy ~/data/my-data.geojson s3://my-bucket/folder/geojson/{z}/{x}/{y}

Copy tiles from one S3 location to another via tilejson describing the source:

$ mapbox-tile-copy ~/data/online-data.tilejson s3://my-bucket/folder/tilejson/{z}/{x}/{y}

Render image tiles from vector tiles, using custom fonts from a location on your computer:

$ MapboxTileCopyFonts=/path/to/font/dir mapbox-tile-copy ~/style.tm2z s3://my-bucket/pngs/{z}/{x}/{y}

Perform a part of a copy operation. Useful for parallel processing a large file:

$ mapbox-tile-copy ~/data/my-tiles.mbtiles s3://my-bucket/parallel/{z}/{x}/{y} --part 2 --parts 12

The --part operation is explicitly zero-indexed because this gives tilelive's stream processors a predictable way to segment tiles per part. For example, the following will distribute all tiles among a single part. So all tiles will be rendered by this single part:

$ mapbox-tile-copy ~/data/my-tiles.mbtiles s3://my-bucket/parallel/{z}/{x}/{y} --part 0 --parts 1

The following example will distribute tiles to the second part out of 4 total parts:

$ mapbox-tile-copy ~/data/my-tiles.mbtiles s3://my-bucket/parallel/{z}/{x}/{y} --part 1 --parts 4

You can add extra parameters supported by tilelive-s3 onto the end of the S3 URL. For instance, to extend the default HTTP timeout of 2000ms:

$ mapbox-tile-copy ~/data/my-tiles.mbtiles s3://my-bucket//{z}/{x}/{y}?timeout=10000

Collect tile size statistics and dump to your local tmp dir named /tmp/<tmpdirpath>/tilelive-bridge-stats.json

$ BRIDGE_LOG_MAX_VTILE_BYTES_COMPRESSED=1 mapbox-tile-copy ~/data/my-tiles.mbtiles s3://my-bucket/folder/mbtiles/{z}/{x}/{y}

Supported file types

  • .mbtiles
  • .tilejson
  • .tm2z
  • .kml
  • .geojson
  • .gpx
  • .csv
  • .shp
  • .tif
  • .vrt
  • serialtiles

Running tests

$ npm test

mapbox-tile-copy's People

Contributors

alianthes avatar andrewharvey avatar camillacaros avatar dnomadb avatar flippmoke avatar garnertb avatar ingalls avatar isiyu avatar jakepruitt avatar jjanczyszyn avatar lefrog avatar mapsam avatar martgnz avatar millzpaugh avatar rclark avatar sfrostenson avatar springmeyer avatar stevage avatar suhasdeshpande avatar synesso avatar tmcw avatar waldyrious avatar who8mycakes avatar wilhelmberg avatar willwhite avatar yhahn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mapbox-tile-copy's Issues

Fails on buckets containing dots

For me, it seems I can successfully upload to buckets that don't contain dots in the name. Otherwise it fails:

$ mapbox-tile-copy ../subways.mbtiles 's3://very-temporary/subways/{z}/{x}/{y}.pbf'
13 tiles @ 13/s, 30% complete [0s]
44 tiles @ 44/s, 100% complete [0s]
44 tiles @ 44/s, 100% complete [0s]

$ mapbox-tile-copy ../subways.mbtiles 's3://very.temp.test/subways/{z}/{x}/{y}.pbf'
13 tiles @ 13/s, 30% complete [0s]
36 tiles @ 36/s, 82% complete [0s]
44 tiles @ 44/s, 100% complete [0s]
Tile does not exist

This is obviously a big problem for serving tiles from S3 as a static website.

This is basically a duplicate of #53, which was apparently fixed by a third-party library update, but...it's now back?

"Tile does not exist" error

I'm attempting to upload some tiles, which is failing like this:

 mapbox-tile-copy subways.mbtiles   s3://vector-tile-test/subways/{z}/{x}/{y}.pbf
23 tiles @ 23/s, 52% complete [0s]
37 tiles @ 37/s, 84% complete [0s]
41 tiles @ 41/s, 93% complete [0s]
44 tiles @ 44/s, 100% complete [0s]
Tile does not exist

I'm finding this output very confusing. Is mapbox-tile-copy even attempting to upload tiles to S3, or is it failing before that?

Different runs show different numbers of tiles as progress before failing.

I was expecting some kind of AWS authentication failure as I want to upload using a profile, and I don't know how to communicate that mapbox-tile-copy. But I'm surprised that an auth failure is being communicated as "Tile does not exist".

Any ideas?

Add minzoom override

In the case of a happytiff, no need to include semi-empty tiles for zoom levels below the happytiff's preferred zoom level (aka "happy zoom"). Add a minzoom override option to specify happyzoom.

mapbox-tile-copy will set the final minzoom to the value passed in via the options object and ignore the minzoom passed in via mapnik-omnivore

cc @camillacaros @rclark

undefined symbol: napi_add_finalizer

I am trying to run mapbox-tile-copy, but receiving the following error:

module.js:682
return process.dlopen(module, path._makeLong(filename));
^

Error: /home/ubuntu/.nvm/versions/node/v8.15.1/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/mapnik/lib/binding/mapnik.node: undefined symbol: napi_add_finalizer
at Object.Module._extensions..node (module.js:682:18)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/home/ubuntu/.nvm/versions/node/v8.15.1/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/mapnik/lib/mapnik.js:31:15)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)

Add node version to README

I was able to get mapbox-tile-copy to install on Node 0.10 but but not 0.12 or io.js 1.2+. It'd be nice if the node version was in the README to make it easier for folks installing.

Validate parts

Per #56, and since zero-indexing can be a bit of a mindbend (for myself included), would be good to add a check ensuring that --part never equals or exceeds --parts.

Something like

if (part >= parts) {
  return callback("woops");
}

cc @mapsam @millzpaugh

support server side encryption (sse) instead of hardcoding aes256

https://github.com/mapbox/mapbox-tile-copy/blob/master/lib/tilelivecopy.js hardcoded AES256 as the encryption algorithm. AWS now supports aws-kms as server side encryption (sse).

the proposal is to pass the encryption algo as a property in the options object

function tilelivecopy(srcUri, s3url, options, callback) {

//  options.sse   : this defaults to aes256 if not set, otherwise, acceptable param could be aws-kms
 

Our team can submit PR

Clarify valid values for --part parameter

I've been using mapbox-tile-copy to process some very large .shp files, using the option to process them in parts.

However, after looking at the documentation I'm still not quite sure about if the --part parameter is zero indexed (e.g. if --parts=10 then valid values for part is 0..9) or if it instead should start at 1 (e.g. if --parts==10 then valid values for part is 1..10).

Trial and error has not really helped me either since I've not reliably been able to process either part 0 or 10 (in case of 10 parts). Sometimes part=0 works (it doesn't contain a lot of tiles though) but most of the time it will just time out (and trying part=10 always seems to time out).

Error: Copy operation timed out at null.<anonymous> (/usr/lib/node_modules/mapbox-tile-copy/node_modules/tilelive/lib/tilelive.js:390:22) at wrapper (timers.js:261:14) at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)

It would be great if the documentation could make this a bit more clear :). Thanks and a huge thank you for open sourcing this awesome project!

Serialtiles length reporting

Before starting a copy, we should count the number of lines in a serialtiles file, and report this to the progress-stream so that we get accurate % complete reporting.

Mapnik arm64 binary not accessible on arm64 darwin

I'm not able to install this module, as the mapnik dependency is failing.

M1 Macbook
Node v16.16.0

npm i --location=global @mapbox/mapbox-tile-copy

Doesn't find mapnik.node, as it's not there

npm ERR! node-pre-gyp info check checked for "/Users/nick/.volta/tools/image/node/16.16.0/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/mapnik/lib/binding/mapnik.node" (not found)

Binary forbidden on S3

npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/mapnik/v4.5.9/Release/darwin-arm64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 403 Forbidden on https://mapbox-node-binary.s3.amazonaws.com/mapnik/v4.5.9/Release/darwin-arm64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v93 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error response status 403 Forbidden on https://mapbox-node-binary.s3.amazonaws.com/mapnik/v4.5.9/Release/darwin-arm64.tar.gz 

Then gyp fails

npm ERR! /bin/sh: mapnik-config: command not found
npm ERR! gyp: Call to 'mapnik-config --cflags' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1

2022-08-04T18_21_41_266Z-debug-0.log

Expand to other copy destinations

Let's try to consider expanding mapbox-tile-copy into a command that can copy to/from a set of curated tilelive sources. It could basically become tilelive-copy without the tilelive.auto-style icky detection of protocols and modules.

It would be less flexible for new/arbitrary tile sources, but would also have a clearly defined dependency set.

cc @GretaCB @yhahn

question on "updating" tiles

Hi there,

QQ: I would like to run this more than once, but noticed it just copies the tiles (which given the name is no real surprise :-) )

But if the new mbtiles have removed some tiles, obviously the old ones would still persist in S3. Do you have any suggestions on how best to deal with this?

I could use mbutil to first create tiles locally and then use "aws s3 sync --delete", but that means using a deprecated mbutil.

I could also copy it to a different/new folder on s3 and then use "aws s3 mv --recursive" but that seems like a bad idea.

Finally, I could copy updates to completely new buckets, and put a cloudfront in front of it all and update which bucket it uses...

Any recommendations?

(ps. I could also just spin up actual tileservers rather than using s3, but then I'd have to maintain those and create multiple servers etc etc, which i was hoping to avoid)

Network errors stopping copy operation

[info] Copying tiles via mbtiles: to s3://my-bucket/test/4f206296/1d52a103a1ac15682eb793766dc8bec1/{z}/{x}/{y}
[error] Error encountered during tile copy operation
[  2s] 100.0000%   1.8k/  1.8k @  883/s | ✓ 1.8k □ 15.7k | 0s leftError: socket hang up

I'm seeing sporadic failures like this while copying tiles. The strange part is that it reports 100% completion. Need to dig through tilelive.copy and perhaps tilelive-s3.

Plan of attack

The goal here is to expose a command-line tool that lets you

$ mapbox-tile-copy /some/geo/file s3://bucket/key/{z}/{x}/{y}.png

In some cases, if you've configured things right, tilelive.js' copy command can already do this.

What this library might be able to help with is

  • Getting everything set up properly. This is to say, registering the right set of tilelive modules that can perform a copy operation on the types of files we're interested in
  • Mapping rawdata files to tilelive-omnivore.
  • Adding some specificity: mapbox-tile-copy will copy tiles from a specific set of file types to S3.

That said we'd like to minimize overlapping logic. There are a number of other libraries that could also benefit from a smart refactor of tilelive's copy command.

So some high-level things to do here:

  • make sure that I've got the setup stuff lined up (in index.js right now)
  • look into making tilelive.js' copy command something that we can get at via require('tilelive') or so
  • write code in this repository that maps a filepath to a tilelive URI (via file sniff) in preparation for the tilelive copy
  • write code in this repository to sidestep tilelive-copy for serialtiles (which require their own, very simple, copy operation)

cc @GretaCB

npm install can't get precompiled binaries

Similar to #47

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.6.2/node-v47-darwin-x64-Release.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v47 ABI) (falling back to source compile with node-gyp)

But in this case, I am running a supported node version. v5.10.1.

Is there a release tarball at that URL? Should I be authorised to fetch it?

Allow upgrading crufty v1 tiles in migration stream

We gained the ability to migrate vector tiles adhering to the v1 spec version to v2 in #62.

But a problem exists:

  • The v1 spec was not strict (or at least its implementations) about layers with no features.
  • Validation is done currently in migration-stream.js before upgrading
  • The validation code currently throws on layers with no features (which are harmless and common).
  • This means that v1 tiles with empty layers cannot be upgraded and the whole process bails.

Instead, for usecases of mapbox-tile-copy like batch migrating large tilesets to v2, we want:

  • Any v1 tile that can be upgraded, is upgraded
  • The resulting v2 tile should be valid

/cc @mapsam @ajashton @GretaCB

serving Tiles on S3?

Can you use mapbox-tile-copy to copy .mbtiles to S3 then access them as Tiles?

I successfully used this command:

mapbox-tile-copy cityname.mbtiles s3://hiu-before-afters/cityname/{z}/{x}/{y}.png?acl=public-read

but the png files don't open up as pngs.

Can't npm install this (node-pre-gyp errors)

I've tried installing this via npm install with various different versions of node (0.10.9, 0.11.0, 0.12.4, 4.2.1, and 5.1.0). All fail, albeit in slightly different ways, but i think all related to node-pre-gyp....

5.1.0 seems to get the furthest, but then ultimately fails with:

node-pre-gyp install --fallback-to-build
/bin/sh: pkg-config: command not found
gyp: Call to 'pkg-config libpng --cflags' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/liebrand/.nvm/versions/node/v5.1.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.0.0
gyp ERR! command "/Users/liebrand/.nvm/versions/node/v5.1.0/bin/node" "/Users/liebrand/.nvm/versions/node/v5.1.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/liebrand/.nvm/versions/node/v5.1.0/lib/node_modules/mapbox-tile-copy/node_modules/tilelive-s3/lib/binding/tilelive_s3.node" "--module_name=tilelive_s3" "--module_path=/Users/liebrand/.nvm/versions/node/v5.1.0/lib/node_modules/mapbox-tile-copy/node_modules/tilelive-s3/lib/binding"
gyp ERR! cwd /Users/liebrand/.nvm/versions/node/v5.1.0/lib/node_modules/mapbox-tile-copy/node_modules/tilelive-s3
gyp ERR! node -v v5.1.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error

node v4 support

Will need to fix this:

ok 65 fixture load
_http_client.js:52
    throw new Error('Protocol "' + protocol + '" not supported. ' +
    ^

Error: Protocol "https:" not supported. Expected "http:".
    at new ClientRequest (_http_client.js:52:11)
    at Object.exports.request (http.js:31:10)
    at Object.socket.once.exports.request (https.js:182:15)
    at Get.request (/Users/dane/projects/mapbox-tile-copy/node_modules/tilejson/node_modules/get/lib/node-get/node-get.js:92:22)
    at Get.perform (/Users/dane/projects/mapbox-tile-copy/node_modules/tilejson/node_modules/get/lib/node-get/node-get.js:132:30)
    at Get.asBuffer (/Users/dane/projects/mapbox-tile-copy/node_modules/tilejson/node_modules/get/lib/node-get/node-get.js:286:10)
    at TileJSON.get (/Users/dane/projects/mapbox-tile-copy/node_modules/tilejson/lib/tilejson.js:207:19)
    at TileJSON.getTile (/Users/dane/projects/mapbox-tile-copy/node_modules/tilejson/lib/tilejson.js:138:10)
    at getTileRetry (/Users/dane/projects/mapbox-tile-copy/node_modules/tilelive/lib/stream-util.js:247:12)
    at get (/Users/dane/projects/mapbox-tile-copy/node_modules/tilelive/lib/stream-scanline.js:103:9)
npm ERR! Test failed.  See above for more details.

can't set minzoom=0

Setting minzoom to 0 doesn't produce any effect, presumably because the 0 is mistaken for a false somewhere like here (the same applies to --maxzoom=0). Values > 0 work fine.

Reduce your request rate

Thanks so much for this library. I'm new to using .mbtiles and S3-style storage, but I think I've managed to get everything running pretty well.

In my case, I have a large .mbtiles file (1gb) generated in QGIS, and I want to send the raster tiles to a DigitalOcean Spaces instance (compatible with S3 buckets). I'm invoking the script like this:

mapbox-tile-copy buildings.mbtiles s3://{MY-BUCKET-NAME}/buildings-2021/{z}/{x}/{y}?timeout=20000

The script seems to be working, but every so often it is halting and reporting the following message:

Reduce your request rate.

I've reached about 175,000 tiles so far, but it's annoying to have to monitor this and re-launch the script every time it happens. Is there a setting I can tweak to avoid this, so that the uploads continue unbroken? Should I take some other approach?

s3 path without template doesn't copy tiles

If I run the following:

mapbox-tile-copy file.geojson s3://waka/flocka/

I get an appropriate output...

8 tiles @ 8/s, 3% complete [0s]
9 tiles @ 9/s, 3% complete [0s]
10 tiles @ 10/s, 4% complete [0s]
11 tiles @ 11/s, 4% complete [0s]
18 tiles @ 18/s, 7% complete [0s]
59 tiles @ 59/s, 27% complete [0s]
172 tiles @ 172/s, 100% complete [0s]
172 tiles @ 172/s, 100% complete [0s]

...but no files/folders exist within the s3 bucket/prefix. Some appropriate solutions:

  1. Throwing an error requiring a template {z}/{x}/{y} is required OR
  2. default to {z}/{x}/{y} and make this clear in the README

cc @rclark @GretaCB @who8mycakes

Add Error Handler for "x is out of range"

[error] required parameter x is out of range of possible values based on z value has recently surfaced while looking through upload errors. It's very similar to required parameter y is out of range, which is currently handled here https://github.com/mapbox/mapbox-tile-copy/blob/master/lib/tilelivecopy.js#L29

Let's add the x is out of range error to this conditional so both x & y out of range are handled in the same conditional statement on L29.

cc @mapsam

"Connection timed out after 2000ms"

I am consistently getting message when attempting to upload a largeish (50MB) tileset. It always times out somewhere between 50 and 80 seconds after starting the upload:

4427 tiles @ 60/s, 21% complete [73s]
Connection timed out after 2000ms

Passing --timeout X doesn't seem to make any difference. (I suspect --timeout doesn't apply to the upload, but to something else).

Any ideas? Maybe it's something like after so many connections it starts taking a while to create new ones, then this 2 second cutoff kicks in?

Update mapnik dependency

At present mapbox-tile-copy requires mapnik 3.7.2

This is causing a lot of installation issues. We have tried on Windows/Linux/OSX with no success as there are many issues with this earlier version of mapnik.

Mapnik 4.0 installs fine. Could this repo be updated to use the later version?

Tests are horribly blippy

Its almost impossible to push a commit and get a green light from Travis without mashing the retry button several times. In fact, its almost impossible to pass tests if you run them locally without trying a few times.

This may have to do with eventual consistency on S3, or just poorly designed tests. I'll try to identify some of the primary offending tests.

npm errors

$ nodejs --version
v10.15.1
$ npm --version
6.4.1
$ gdalinfo --version
GDAL 2.2.3, released 2017/11/20
$ apt-cache show libgdal-dev
Package: libgdal-dev
Architecture: amd64
Version: 2.2.3+dfsg-2

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
$ sudo npm install -g @mapbox/mapbox-tile-copy
[sudo] password for ubuntu: 
npm WARN deprecated [email protected]: Package abandoned, contact [email protected] for more info.
npm WARN deprecated [email protected]: renamed to d3-queue
npm WARN deprecated [email protected]: protozero should no longer be used via npm, install instead via https://github.com/mapbox/mason
npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated [email protected]: This module is now under the @mapbox namespace: install @mapbox/tiletype instead
npm WARN deprecated [email protected]: This module has moved: please install @mapbox/vector-tile instead
npm WARN deprecated [email protected]: This module has moved: please install @mapbox/point-geometry instead
/usr/bin/mapbox-tile-copy -> /usr/lib/node_modules/@mapbox/mapbox-tile-copy/bin/mapbox-tile-copy.js

> [email protected] install /usr/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/gdal
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/gdal/lib/binding' 
gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/ubuntu/.node-gyp/10.15.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/gdal/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/gdal/.node-gyp'
gyp ERR! System Linux 4.15.0-45-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/gdal/lib/binding/node-v64-linux-x64/gdal.node" "--module_name=gdal" "--module_path=/usr/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/gdal/lib/binding/node-v64-linux-x64" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd /usr/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/gdal
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/gdal/lib/binding/node-v64-linux-x64/gdal.node --module_name=gdal --module_path=/usr/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/gdal/lib/binding/node-v64-linux-x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/gdal/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 4.15.0-45-generic
node-pre-gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/gdal/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/gdal
node-pre-gyp ERR! node -v v10.15.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/gdal/lib/binding/node-v64-linux-x64/gdal.node --module_name=gdal --module_path=/usr/lib/node_modules/@mapbox/mapbox-tile-copy/node_modules/gdal/lib/binding/node-v64-linux-x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2019-02-03T05_19_38_469Z-debug.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.