mapbox / spritezero-cli Goto Github PK
View Code? Open in Web Editor NEWA command-line interface to spritezero.
License: Other
A command-line interface to spritezero.
License: Other
Hi, we are using [email protected] and can't seem install it anymore since it cannot find the mapnik 3.5.13 node module from Mapbox's S3 bucket. (We're still on 1.1.2 since later versions require GCC 5.x). Does this ring a bell?
+ npm install -g [email protected]
npm WARN deprecated [email protected]: This module is now under the @mapbox namespace: install @mapbox/spritezero-cli instead
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN deprecated [email protected]: This module is now under the @mapbox namespace: install @mapbox/spritezero instead
npm WARN deprecated [email protected]: This module is now under the @mapbox namespace: install @mapbox/shelf-pack instead
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
> [email protected] preinstall /var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/spritezero-cli/node_modules/spritezero/node_modules/mapnik
> npm install node-pre-gyp
npm WARN engine [email protected]: wanted: {"node":">= 4"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=0.12.0","iojs":">=1.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">= 0.12"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4.5.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"iojs":">= 1.0.0","node":">= 0.12.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/bin/node-pre-gyp -> /var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/node-pre-gyp/bin/node-pre-gyp
[email protected] /var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/node-pre-gyp
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
npm WARN engine [email protected]: wanted: {"node":">= 4"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=0.12.0","iojs":">=1.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4.5.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">= 0.12"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"iojs":">= 1.0.0","node":">= 0.12.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
> [email protected] install /var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/spritezero-cli/node_modules/spritezero/node_modules/mapnik
> node-pre-gyp install --fallback-to-build
/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/spritezero-cli/node_modules/spritezero/node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js:5
const Hoek = require('hoek');
^^^^^
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.5.13/Release/node-v11-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v11 ABI) (falling back to source compile with node-gyp)
/bin/sh: 1: mapnik-config: not found
gyp: Call to 'mapnik-config --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 (/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.18.44
gyp ERR! command "/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/bin/node" "/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/spritezero-cli/node_modules/spritezero/node_modules/mapnik/lib/binding/node-v11-linux-x64/mapnik.node" "--module_name=mapnik" "--module_path=/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/spritezero-cli/node_modules/spritezero/node_modules/mapnik/lib/binding/node-v11-linux-x64"
gyp ERR! cwd /var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/spritezero-cli/node_modules/spritezero/node_modules/mapnik
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/bin/node /var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/spritezero-cli/node_modules/spritezero/node_modules/mapnik/lib/binding/node-v11-linux-x64/mapnik.node --module_name=mapnik --module_path=/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/spritezero-cli/node_modules/spritezero/node_modules/mapnik/lib/binding/node-v11-linux-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/spritezero-cli/node_modules/spritezero/node_modules/mapnik/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:98:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:756:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:823:5)
node-pre-gyp ERR! System Linux 3.18.44
node-pre-gyp ERR! command "node" "/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/spritezero-cli/node_modules/spritezero/node_modules/mapnik/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/spritezero-cli/node_modules/spritezero/node_modules/mapnik
node-pre-gyp ERR! node -v v0.10.32
node-pre-gyp ERR! node-pre-gyp -v v0.6.37
node-pre-gyp ERR! not ok
Failed to execute '/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/bin/node /var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/spritezero-cli/node_modules/spritezero/node_modules/mapnik/lib/binding/node-v11-linux-x64/mapnik.node --module_name=mapnik --module_path=/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/spritezero-cli/node_modules/spritezero/node_modules/mapnik/lib/binding/node-v11-linux-x64' (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 most likely a problem with the mapnik package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls mapnik
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.18.44
npm ERR! command "/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/bin/node" "/var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/bin/npm" "install" "-g" "[email protected]"
npm ERR! cwd /var/lib/jenkins/workspace/myjob
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
Build step 'Execute shell' marked build as failure
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"
node --version
v8.10.0
npm -v
5.6.0
Faile traceback:
sudo -E npm install -g @mapbox/spritezero-cli
npm WARN deprecated [email protected]: protozero should no longer be used via npm, install instead via https://github.com/mapbox/mason
/usr/local/bin/spritezero -> /usr/local/lib/node_modules/@mapbox/spritezero-cli/bin/spritezero
> [email protected] install /usr/local/lib/node_modules/@mapbox/spritezero-cli/node_modules/mapnik
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.6.2/node-v57-linux-x64-Release.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@mapbox/spritezero-cli/node_modules/mapnik/build'
gyp ERR! System Linux 4.15.0-43-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/@mapbox/spritezero-cli/node_modules/mapnik/lib/binding/mapnik.node" "--module_name=mapnik" "--module_path=/usr/local/lib/node_modules/@mapbox/spritezero-cli/node_modules/mapnik/lib/binding"
gyp ERR! cwd /usr/local/lib/node_modules/@mapbox/spritezero-cli/node_modules/mapnik
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/@mapbox/spritezero-cli/node_modules/mapnik/lib/binding/mapnik.node --module_name=mapnik --module_path=/usr/local/lib/node_modules/@mapbox/spritezero-cli/node_modules/mapnik/lib/binding' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/@mapbox/spritezero-cli/node_modules/mapnik/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 4.15.0-43-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/@mapbox/spritezero-cli/node_modules/mapnik/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/@mapbox/spritezero-cli/node_modules/mapnik
node-pre-gyp ERR! node -v v8.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/@mapbox/spritezero-cli/node_modules/mapnik/lib/binding/mapnik.node --module_name=mapnik --module_path=/usr/local/lib/node_modules/@mapbox/spritezero-cli/node_modules/mapnik/lib/binding' (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
Am I doing something wrong? I get: 'npm ERR! 404 'spritezero-cli' is not in the npm registry' when running the command line installation.
Mapnik installation does not support windows anymore.
This means that this tool can't be installed on windows (As far as I could tell).
Creating a docker image of this command line tool can bypass this limitation for windows users.
I have two SVGs:
https://drive.google.com/file/d/1v1en3ISE10nzML6WOmvR--IXo-9UzLub/view?usp=sharing
and
https://drive.google.com/file/d/13L9zbDi1SEHEGnnY-1sZa-1geln3z7gA/view?usp=sharing
The first results in black rectangular, second looks good. What could be the problem?
The attached svg does not seem to get converted in to the png sprite (nor does it throw an error btw).
I suspect the tags to cause the problem
a- is there a way to ensure it does convert? and if not
b- do you have any recommendation on any tools that can replace tags with the referenced tags? preferably a commandline tool rather than some gui
Test coverage is actually 100%, but Travis-CI is messing up tap/nyc's flow somehow.
The new spritezero uses async io.
Howdy. It seems there's a bug with doing the npm install for this. Error begins with:
node-pre-gyp ERR! Tried to download: https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.5.13/Release/node-v14-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v14 ABI) (falling back to source compile with node-gyp)
/bin/sh: mapnik-config: command not found
gyp: Call to 'mapnik-config --cflags' returned exit status 127 while in binding.gyp. 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/dmoriarty/n/lib/node_modules
Which seems like it might be something more associated with mapnik itself? Eitherway, can't get this working.
What is the license for spritezero-cli and spritezero?
eslint catches trivial bugs, so we should add it.
I just tried to install this tool but got a series of errors from the npm installer. Here's the first part:
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.6.2/node-v59-darwin-x64-Release.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp)
AFAICT, the rest are consequences of failure to install mapnik.
Let us find how install and use spritezero- latest release. I succedednpm i @mapbox/spritezero-cli --save-dev
only with node v8.9.4 on windows 10.
EDIT: it looks like spritezero is trying to process this as an SVG.
Got this error when trying to spritify https://gist.github.com/peterqliu/7ff62635aa09fd1db79b, even though width="72px" height="16px"
is explicitly in the markup.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.