mapbox / spritezero-cli

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

Did we delete node binaries from S3? (mapnik) ? #24

Closed vdumont closed 7 years ago

vdumont commented 7 years ago

Hi, we are using spritezero-cli@1.1.2 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 spritezero-cli@1.1.2
npm WARN deprecated spritezero-cli@1.1.2: This module is now under the @mapbox namespace: install @mapbox/spritezero-cli instead
npm WARN engine spritezero-cli@1.1.2: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN deprecated spritezero@3.7.1: This module is now under the @mapbox namespace: install @mapbox/spritezero instead
npm WARN deprecated shelf-pack@2.0.1: This module is now under the @mapbox namespace: install @mapbox/shelf-pack instead
npm WARN engine shelf-pack@2.0.1: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})

> mapnik@3.5.13 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 request@2.82.0: wanted: {"node":">= 4"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine deep-extend@0.4.2: wanted: {"node":">=0.12.0","iojs":">=1.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine form-data@2.3.1: wanted: {"node":">= 0.12"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine har-validator@5.0.3: wanted: {"node":">=4"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine hawk@6.0.2: wanted: {"node":">=4.5.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine har-schema@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine hoek@4.2.0: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine boom@4.3.1: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine sntp@2.0.2: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine cryptiles@3.1.2: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine boom@5.2.0: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine co@4.6.0: 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
node-pre-gyp@0.6.37 /var/lib/jenkins/workspace/myjob/jenkins-myjob-118-node/lib/node_modules/node-pre-gyp
├── semver@5.4.1
├── rc@1.2.1 (strip-json-comments@2.0.1, ini@1.3.4, deep-extend@0.4.2, minimist@1.2.0)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── nopt@4.0.1 (abbrev@1.1.0, osenv@0.1.4)
├── rimraf@2.6.2 (glob@7.1.2)
├── tar-pack@3.4.0 (uid-number@0.0.6, once@1.4.0, debug@2.6.8, fstream@1.0.11, fstream-ignore@1.0.5, readable-stream@2.3.3)
├── tar@2.2.1 (block-stream@0.0.9, inherits@2.0.3, fstream@1.0.11)
├── npmlog@4.1.2 (set-blocking@2.0.0, console-control-strings@1.1.0, gauge@2.7.4, are-we-there-yet@1.1.4)
├── tape@4.8.0 (inherits@2.0.3, has@1.0.1, defined@1.0.0, resumer@0.0.0, deep-equal@1.0.1, through@2.3.8, function-bind@1.1.1, minimist@1.2.0, object-inspect@1.3.0, glob@7.1.2, for-each@0.3.2, resolve@1.4.0, string.prototype.trim@1.1.2)
└── request@2.82.0 (is-typedarray@1.0.0, oauth-sign@0.8.2, forever-agent@0.6.1, aws-sign2@0.7.0, tunnel-agent@0.6.0, caseless@0.12.0, stringstream@0.0.5, isstream@0.1.2, json-stringify-safe@5.0.1, safe-buffer@5.1.1, extend@3.0.1, aws4@1.6.0, performance-now@2.1.0, uuid@3.1.0, combined-stream@1.0.5, qs@6.5.1, form-data@2.3.1, mime-types@2.1.17, tough-cookie@2.3.2, hawk@6.0.2, http-signature@1.2.0, har-validator@5.0.3)
npm WARN engine request@2.82.0: wanted: {"node":">= 4"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine deep-extend@0.4.2: wanted: {"node":">=0.12.0","iojs":">=1.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine hawk@6.0.2: wanted: {"node":">=4.5.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine form-data@2.3.1: wanted: {"node":">= 0.12"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine har-validator@5.0.3: wanted: {"node":">=4"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine har-schema@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine boom@4.3.1: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine hoek@4.2.0: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine cryptiles@3.1.2: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine sntp@2.0.2: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine boom@5.2.0: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine co@4.6.0: wanted: {"iojs":">= 1.0.0","node":">= 0.12.0"} (current: {"node":"0.10.32","npm":"1.4.28"})

> mapnik@3.5.13 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 mapnik@3.5.13 and node@0.10.32 (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! mapnik@3.5.13 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the mapnik@3.5.13 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" "spritezero-cli@1.1.2"
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
vdumont commented 7 years ago

cc @dane @springmeyer @bhousel

bhousel commented 7 years ago

gyp ERR! node -v v0.10.32

This is a pretty old version of node, and many of your npm dependencies are issuing warnings that they are expecting >4 or so, so I'm not really surprised there are issues with the install. Can you upgrade to a node 4.x or 6.x and try again?

vdumont commented 7 years ago

@bhousel Thanks, I can look into updating node but doubt this is the issue here since we've been using this pinned version for over a year (it gives warnings but installs/runs fine). I'm more concerned that it's now complaining about the missing mapnik binaries from the s3 bucket, are you aware of a cleanup that happened on that bucket? EDIT: actually I can curl https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.5.13/Release/node-v11-linux-x64.tar.gz just fine, which makes the error confusing O_o

springmeyer commented 7 years ago

This is due to request/request#2772. That request release broke node v0.10.x support. Request is used inside node-pre-gyp for downloading the binaries. It is failing - your log shows the problem:

/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'); ^^^^^

The node-mapnik version you are pulling in uses preinstall to pull the copy of node-pre-gyp. That means that request is auto-upgraded. You can try using node-mapnik >= 3.6.0 which moved to bundling node-pre-gyp (https://github.com/mapnik/node-mapnik/blob/master/CHANGELOG.md#360) and therefore the request version should not be auto-upgraded.

This impacts all users of any applications using node-pre-gyp and node v0.10.x so I'm working on trying to adapt over at https://github.com/mapbox/node-pre-gyp/pull/319

springmeyer commented 7 years ago

Because node v0.10.x is deprecated, I'll echo that users hitting this should ideally upgrade to a more recent node version. Also, because this is unrelated to spritezero, I'll close now.