mapbox / spritezero-cli

A command-line interface to spritezero.
Other
166 stars 66 forks source link

Faild to install #30

Open smounir opened 5 years ago

smounir commented 5 years ago

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 protozero@1.5.1: 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

> mapnik@3.6.2 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 mapnik@3.6.2 and node@8.10.0 (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! mapnik@3.6.2 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the mapnik@3.6.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above
CarbonHeartDev commented 5 years ago

I have the same problem and I hope for a quick intervention since currently is the only way to pass images into symbol layers and I need them in a project.

vincentvanderweele commented 5 years ago

I ran into the same problem. Updating spritezero to version 6 (similar to what is done in #28) solves this.

NickPepper commented 4 years ago

Exactly the same issue on MacOS. Updating spritezero to version 6(.1.1) does not solves this. The problem seems to be somewhere inside the mapnik@3.6.2.

After playing a bit with nvm I got this combination:

% node --version v12.16.1

% npm --version 6.13.4

And switching to @mapbox/spritezero": "^6.2.0-dev" with these node/npm versions solves the issue on my Catalina machine. But I also did in advance: % npm install -g node-gyp % npm install -g node-pre-gyp % npm i svgo --save-dev