the tilelive-copy command uses tilelive.auto, which tries to load the plugin module automatically by concatenating strings from the protocol. Loading a scoped npm module, such as @mapbox/tilelive-omnivore doesn't work, since the attempted require looks like require('tilelive-omnivore') and this fails silently, leading to an error in the actual copy operation.
Unfortunately we can't update tilelive.auto to work with scoped packages, since we aren't sure what the name of the scope package is (i.e. can't assume it will always be @mapbox).
A solution would be to provide an added flag to the CLI called --protocol (name TBD) that allows you to pass in a string of whatever protocol you want to register - this should match the name of the module in the package.json. Example:
the
tilelive-copy
command usestilelive.auto
, which tries to load the plugin module automatically by concatenating strings from the protocol. Loading a scoped npm module, such as@mapbox/tilelive-omnivore
doesn't work, since the attempted require looks likerequire('tilelive-omnivore')
and this fails silently, leading to an error in the actual copy operation.Unfortunately we can't update
tilelive.auto
to work with scoped packages, since we aren't sure what the name of the scope package is (i.e. can't assume it will always be@mapbox
).A solution would be to provide an added flag to the CLI called
--protocol
(name TBD) that allows you to pass in a string of whatever protocol you want to register - this should match the name of the module in the package.json. Example:cc @rclark @perrygeo @GretaCB