mapbox / node-zipfile

Inspect and uncompress zipfile archives in Node.js
https://github.com/mapbox/node-zipfile
Other
101 stars 44 forks source link

v0.5.10 broken for node 0.10.x #72

Closed rochoa closed 7 years ago

rochoa commented 7 years ago

Republished v0.5.10 fails to install with node 0.10.x.

/tmp/zipfile-test$ rm -rf node_modules/
/tmp/zipfile-test$ node -v
v0.10.46
/tmp/zipfile-test$ npm -v
2.14.22
/tmp/zipfile-test$ npm install zipfile@0.5.10
npm WARN package.json zipfile-test@1.0.0 No description
npm WARN package.json zipfile-test@1.0.0 No repository field.
npm WARN package.json zipfile-test@1.0.0 No README data
-
> zipfile@0.5.10 install /private/tmp/zipfile-test/node_modules/zipfile
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! UNCAUGHT EXCEPTION
node-pre-gyp ERR! stack Error: Cannot find module 'mkdirp'
node-pre-gyp ERR! stack     at Function.Module._resolveFilename (module.js:338:15)
node-pre-gyp ERR! stack     at Function.Module._load (module.js:280:25)
node-pre-gyp ERR! stack     at Module.require (module.js:364:17)
node-pre-gyp ERR! stack     at require (module.js:380:17)
node-pre-gyp ERR! stack     at Object.<anonymous> (/private/tmp/zipfile-test/node_modules/zipfile/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/writer.js:6:13)
node-pre-gyp ERR! stack     at Module._compile (module.js:456:26)
node-pre-gyp ERR! stack     at Object.Module._extensions..js (module.js:474:10)
node-pre-gyp ERR! stack     at Module.load (module.js:356:32)
node-pre-gyp ERR! stack     at Function.Module._load (module.js:312:12)
node-pre-gyp ERR! stack     at Module.require (module.js:364:17)
node-pre-gyp ERR! System Darwin 15.6.0
node-pre-gyp ERR! command "node" "/private/tmp/zipfile-test/node_modules/zipfile/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /private/tmp/zipfile-test/node_modules/zipfile
node-pre-gyp ERR! node -v v0.10.46
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR!     <https://github.com/mapbox/node-pre-gyp/issues>
npm ERR! Darwin 15.6.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "zipfile@0.5.10"
npm ERR! node v0.10.46
npm ERR! npm  v2.14.22
npm ERR! code ELIFECYCLE

npm ERR! zipfile@0.5.10 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the zipfile@0.5.10 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the zipfile 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 information on how to open an issue for this project with:
npm ERR!     npm bugs zipfile
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls zipfile
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /private/tmp/zipfile-test/npm-debug.log
/tmp/zipfile-test$ npm install zipfile@0.5.9
npm WARN package.json zipfile-test@1.0.0 No description
npm WARN package.json zipfile-test@1.0.0 No repository field.
npm WARN package.json zipfile-test@1.0.0 No README data
-
> zipfile@0.5.9 install /private/tmp/zipfile-test/node_modules/zipfile
> node-pre-gyp install --fallback-to-build

[zipfile] Success: "/private/tmp/zipfile-test/node_modules/zipfile/lib/binding/node-v11-darwin-x64/zipfile.node" is installed via remote
zipfile@0.5.9 node_modules/zipfile
└── nan@2.1.0

Same for a Linux machine:

/tmp/zipfile-test$ npm install zipfile@0.5.10
|
> zipfile@0.5.10 install /tmp/zipfile-test/node_modules/zipfile
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! UNCAUGHT EXCEPTION
node-pre-gyp ERR! stack Error: Cannot find module 'mkdirp'
node-pre-gyp ERR! stack     at Function.Module._resolveFilename (module.js:338:15)
node-pre-gyp ERR! stack     at Function.Module._load (module.js:280:25)
node-pre-gyp ERR! stack     at Module.require (module.js:364:17)
node-pre-gyp ERR! stack     at require (module.js:380:17)
node-pre-gyp ERR! stack     at Object.<anonymous> (/tmp/zipfile-test/node_modules/zipfile/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/writer.js:6:13)
node-pre-gyp ERR! stack     at Module._compile (module.js:456:26)
node-pre-gyp ERR! stack     at Object.Module._extensions..js (module.js:474:10)
node-pre-gyp ERR! stack     at Module.load (module.js:356:32)
node-pre-gyp ERR! stack     at Function.Module._load (module.js:312:12)
node-pre-gyp ERR! stack     at Module.require (module.js:364:17)
node-pre-gyp ERR! System Linux 3.13.0-32-generic
node-pre-gyp ERR! command "node" "/tmp/zipfile-test/node_modules/zipfile/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /tmp/zipfile-test/node_modules/zipfile
node-pre-gyp ERR! node -v v0.10.26
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR!     <https://github.com/mapbox/node-pre-gyp/issues>
npm ERR! Linux 3.13.0-32-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "zipfile@0.5.10"
npm ERR! node v0.10.26
npm ERR! npm  v2.14.16
npm ERR! code ELIFECYCLE

npm ERR! zipfile@0.5.10 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the zipfile@0.5.10 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the zipfile 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 information on how to open an issue for this project with:
npm ERR!     npm bugs zipfile
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls zipfile
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/zipfile-test/npm-debug.log
/tmp/zipfile-test$ npm install zipfile@0.5.9
-
> zipfile@0.5.9 install /tmp/zipfile-test/node_modules/zipfile
> node-pre-gyp install --fallback-to-build

[zipfile] Success: "/tmp/zipfile-test/node_modules/zipfile/lib/binding/node-v11-linux-x64/zipfile.node" is installed via remote
zipfile@0.5.9 node_modules/zipfile
└── nan@2.1.0

It installs OK when installing it with:

$ node -v
v6.9.2
$ npm -v
3.10.9
wchislettmedia commented 7 years ago

I'm also seeing this issue. We were using v0.5.9 but this release seems to be missing and 0.5.10 install is failing. I'm using Ubuntu 14.04 and node 4.5.0. Thanks

springmeyer commented 7 years ago

Just published a new v0.5.11 - does that fix the problem for you?

rochoa commented 7 years ago

Hi Dane,

No, it's still a problem.

bash-3.2$ ls
bash-3.2$ npm init --yes
Wrote to /private/tmp/zipfile-test/package.json:

{
  "name": "zipfile-test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}

bash-3.2$ npm install zipfile@0.5.11
npm WARN package.json zipfile-test@1.0.0 No description
npm WARN package.json zipfile-test@1.0.0 No repository field.
npm WARN package.json zipfile-test@1.0.0 No README data
|
> zipfile@0.5.11 install /private/tmp/zipfile-test/node_modules/zipfile
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/zipfile/v0.5.11/node-v11-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for zipfile@0.5.11 and node@0.10.46 (node-v11 ABI) (falling back to source compile with node-gyp)
  TOUCH deps_libzip_gyp_action_before_build_target_unpack_libzip_dep.intermediate
  ACTION deps_libzip_gyp_action_before_build_target_unpack_libzip_dep deps_libzip_gyp_action_before_build_target_unpack_libzip_dep.intermediate
  TOUCH Release/obj.target/deps/action_before_build.stamp
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_add.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_add_dir.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_add_entry.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_close.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_delete.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_dir_add.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_dirent.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_discard.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_entry.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_err_str.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_error.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_error_clear.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_error_get.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_error_get_sys_type.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_error_strerror.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_error_to_str.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_extra_field.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_extra_field_api.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_fclose.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_fdopen.o
Release/obj/gen/libzip-0.11.1/lib/zip_fdopen.c: In function 'zip_fdopen':
Release/obj/gen/libzip-0.11.1/lib/zip_fdopen.c:62:5: warning: implicit declaration of function 'dup' [-Wimplicit-function-declaration]
     if ((fd=dup(fd_orig)) < 0) {
     ^
Release/obj/gen/libzip-0.11.1/lib/zip_fdopen.c:68:2: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration]
  close(fd);
  ^
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_file_add.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_file_error_clear.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_file_error_get.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_file_get_comment.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_file_get_external_attributes.o
Release/obj/gen/libzip-0.11.1/lib/zip_file_get_external_attributes.c: In function 'zip_file_get_external_attributes':
Release/obj/gen/libzip-0.11.1/lib/zip_file_get_external_attributes.c:41:24: warning: unused variable 'str' [-Wunused-variable]
     const zip_uint8_t *str;
                        ^
Release/obj/gen/libzip-0.11.1/lib/zip_file_get_external_attributes.c:40:18: warning: unused variable 'len' [-Wunused-variable]
     zip_uint32_t len;
                  ^
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_file_get_offset.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_file_rename.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_file_replace.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_file_set_comment.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_file_set_external_attributes.o
Release/obj/gen/libzip-0.11.1/lib/zip_file_set_external_attributes.c: In function 'zip_file_set_external_attributes':
Release/obj/gen/libzip-0.11.1/lib/zip_file_set_external_attributes.c:55:58: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     unchanged_attributes = e->orig ? e->orig->ext_attrib : ZIP_EXT_ATTRIB_DEFAULT;
                                                          ^
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_file_strerror.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_filerange_crc.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_fopen.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_fopen_encrypted.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_fopen_index.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_fopen_index_encrypted.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_fread.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_get_archive_comment.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_get_archive_flag.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_get_compression_implementation.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_get_encryption_implementation.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_get_file_comment.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_get_name.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_get_num_entries.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_get_num_files.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_memdup.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_name_locate.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_new.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_open.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_rename.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_replace.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_set_archive_comment.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_set_archive_flag.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_set_default_password.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_set_file_comment.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_set_file_compression.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_set_name.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_buffer.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_close.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_crc.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_deflate.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_error.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_file.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_filep.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_free.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_function.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_layered.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_open.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_pkware.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_pop.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_read.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_stat.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_window.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_zip.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_source_zip_new.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_stat.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_stat_index.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_stat_init.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_strerror.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_string.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_unchange.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_unchange_all.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_unchange_archive.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_unchange_data.o
  CC(target) Release/obj.target/libzip/gen/libzip-0.11.1/lib/zip_utf-8.o
  LIBTOOL-STATIC Release/zip.a
  CC(target) Release/obj.target/zlib/deps/zlib/contrib/minizip/ioapi.o
  CC(target) Release/obj.target/zlib/deps/zlib/contrib/minizip/unzip.o
  CC(target) Release/obj.target/zlib/deps/zlib/contrib/minizip/zip.o
  CC(target) Release/obj.target/zlib/deps/zlib/adler32.o
  CC(target) Release/obj.target/zlib/deps/zlib/compress.o
  CC(target) Release/obj.target/zlib/deps/zlib/crc32.o
  CC(target) Release/obj.target/zlib/deps/zlib/deflate.o
  CC(target) Release/obj.target/zlib/deps/zlib/gzclose.o
  CC(target) Release/obj.target/zlib/deps/zlib/gzlib.o
../deps/zlib/gzlib.c: In function 'gz_open':
../deps/zlib/gzlib.c:256:9: warning: implicit declaration of function 'lseek' [-Wimplicit-function-declaration]
         state->start = LSEEK(state->fd, 0, SEEK_CUR);
         ^
  CC(target) Release/obj.target/zlib/deps/zlib/gzread.o
../deps/zlib/gzread.c: In function 'gz_load':
../deps/zlib/gzread.c:30:9: warning: implicit declaration of function 'read' [-Wimplicit-function-declaration]
         ret = read(state->fd, buf + *have, len - *have);
         ^
../deps/zlib/gzread.c: In function 'gzclose_r':
../deps/zlib/gzread.c:591:5: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration]
     ret = close(state->fd);
     ^
  CC(target) Release/obj.target/zlib/deps/zlib/gzwrite.o
../deps/zlib/gzwrite.c: In function 'gz_comp':
../deps/zlib/gzwrite.c:84:9: warning: implicit declaration of function 'write' [-Wimplicit-function-declaration]
         got = write(state->fd, strm->next_in, strm->avail_in);
         ^
../deps/zlib/gzwrite.c: In function 'gzclose_w':
../deps/zlib/gzwrite.c:573:5: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration]
     if (close(state->fd) == -1)
     ^
  CC(target) Release/obj.target/zlib/deps/zlib/infback.o
  CC(target) Release/obj.target/zlib/deps/zlib/inffast.o
  CC(target) Release/obj.target/zlib/deps/zlib/inflate.o
  CC(target) Release/obj.target/zlib/deps/zlib/inftrees.o
  CC(target) Release/obj.target/zlib/deps/zlib/trees.o
  CC(target) Release/obj.target/zlib/deps/zlib/uncompr.o
  CC(target) Release/obj.target/zlib/deps/zlib/zutil.o
  LIBTOOL-STATIC Release/chrome_zlib.a
  CXX(target) Release/obj.target/zipfile/src/node_zipfile.o
c++: error: unrecognized command line option '-stdlib=libc++'
make: *** [Release/obj.target/zipfile/src/node_zipfile.o] Error 1
rm deps_libzip_gyp_action_before_build_target_unpack_libzip_dep.intermediate
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Darwin 15.6.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/private/tmp/zipfile-test/node_modules/zipfile/lib/binding/node-v11-darwin-x64/zipfile.node" "--module_name=zipfile" "--module_path=/private/tmp/zipfile-test/node_modules/zipfile/lib/binding/node-v11-darwin-x64"
gyp ERR! cwd /private/tmp/zipfile-test/node_modules/zipfile
gyp ERR! node -v v0.10.46
gyp ERR! node-gyp -v v3.3.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp build --fallback-to-build --module=/private/tmp/zipfile-test/node_modules/zipfile/lib/binding/node-v11-darwin-x64/zipfile.node --module_name=zipfile --module_path=/private/tmp/zipfile-test/node_modules/zipfile/lib/binding/node-v11-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/private/tmp/zipfile-test/node_modules/zipfile/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:766:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:833:5)
node-pre-gyp ERR! System Darwin 15.6.0
node-pre-gyp ERR! command "node" "/private/tmp/zipfile-test/node_modules/zipfile/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /private/tmp/zipfile-test/node_modules/zipfile
node-pre-gyp ERR! node -v v0.10.46
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp build --fallback-to-build --module=/private/tmp/zipfile-test/node_modules/zipfile/lib/binding/node-v11-darwin-x64/zipfile.node --module_name=zipfile --module_path=/private/tmp/zipfile-test/node_modules/zipfile/lib/binding/node-v11-darwin-x64' (1)
npm ERR! Darwin 15.6.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "zipfile@0.5.11"
npm ERR! node v0.10.46
npm ERR! npm  v2.14.22
npm ERR! code ELIFECYCLE

npm ERR! zipfile@0.5.11 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zipfile@0.5.11 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the zipfile 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 information on how to open an issue for this project with:
npm ERR!     npm bugs zipfile
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls zipfile
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /private/tmp/zipfile-test/npm-debug.log

I think the important bit now is:

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/zipfile/v0.5.11/node-v11-darwin-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for zipfile@0.5.11 and node@0.10.46 (node-v11 ABI) (falling back to source compile with node-gyp)

However, and what is weird now, cloning the repo and doing npm install successes:

bash-3.2$ pwd
/tmp/node-zipfile
bash-3.2$ git remote -v
origin  git@github.com:mapbox/node-zipfile.git (fetch)
origin  git@github.com:mapbox/node-zipfile.git (push)
bash-3.2$ make clean
rm -rf lib/binding/
rm -rf ./test/tmp/*
rm -rf ./node_modules/
rm -f ./*tgz
bash-3.2$ git log -1
commit 91677ac41ac3c91a9e73436128d1ae9d55cb1585
Author: Dane Springmeyer <dane@mapbox.com>
Date:   Tue Dec 13 13:51:49 2016 -0800

    add mention of node v7 to v0.5.10 changelog
bash-3.2$ npm install
npm WARN package.json zipfile@0.5.10 No license field.
npm WARN installMany node-pre-gyp was bundled with zipfile@0.5.10, but bundled package wasn't found in unpacked tree
npm WARN engine request@2.79.0: wanted: {"node":">= 4"} (current: {"node":"0.10.46","npm":"2.14.22"})
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN engine deep-extend@0.4.1: wanted: {"node":">=0.12.0","iojs":">=1.0.0"} (current: {"node":"0.10.46","npm":"2.14.22"})
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN engine form-data@2.1.2: wanted: {"node":">= 0.12"} (current: {"node":"0.10.46","npm":"2.14.22"})
-
> zipfile@0.5.10 install /private/tmp/node-zipfile
> node-pre-gyp install --fallback-to-build

[zipfile] Success: "/private/tmp/node-zipfile/lib/binding/node-v11-darwin-x64/zipfile.node" is installed via remote

> zipfile@0.5.10 prepublish /private/tmp/node-zipfile
> npm ls
...

But if I modify the package to target 0.5.11 version, I get again the 403 error when downloading.

bash-3.2$ make clean
rm -rf lib/binding/
rm -rf ./test/tmp/*
rm -rf ./node_modules/
rm -f ./*tgz
bash-3.2$ git diff
diff --git a/package.json b/package.json
index 7caf831..c5c488f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name"          : "zipfile",
-  "version"       : "0.5.10",
+  "version"       : "0.5.11",
   "main"          : "./lib/index.js",
   "description"   : "C++ library for handling zipfiles in node",
   "keywords"      : ["zipfile", "uncompress", "unzip", "zlib"],
bash-3.2$ npm install
npm WARN package.json zipfile@0.5.11 No license field.
npm WARN installMany node-pre-gyp was bundled with zipfile@0.5.11, but bundled package wasn't found in unpacked tree
npm WARN engine request@2.79.0: wanted: {"node":">= 4"} (current: {"node":"0.10.46","npm":"2.14.22"})
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN engine deep-extend@0.4.1: wanted: {"node":">=0.12.0","iojs":">=1.0.0"} (current: {"node":"0.10.46","npm":"2.14.22"})
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN engine form-data@2.1.2: wanted: {"node":">= 0.12"} (current: {"node":"0.10.46","npm":"2.14.22"})
-
> zipfile@0.5.11 install /private/tmp/node-zipfile
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/zipfile/v0.5.11/node-v11-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for zipfile@0.5.11 and node@0.10.46 (node-v11 ABI) (falling back to source compile with node-gyp)
...

HTH, and thanks a lot for being so responsive 😄 .

wchislettmedia commented 7 years ago

0.5.11 works for me, thanks.

springmeyer commented 7 years ago

@rochoa thanks for testing again. I messed up and forgot to publish binaries for the release. That is the cause for the 404. So then the build falls back to a source compile and that fails due to something with compiler setup not recognizing the c++11 standard, which is odd but not worth debugging. I've just pushed a publish job to travis. Once that is green (https://travis-ci.org/mapbox/node-zipfile/builds/184696068) then v0.5.11 installs should actually work again without a source-compile fallback. Sorry about that.

rochoa commented 7 years ago

It's working now. Although the TravisCI build failed, I'm able to access https://mapbox-node-binary.s3.amazonaws.com/zipfile/v0.5.11/node-v11-darwin-x64.tar.gz.

Thanks a lot, @springmeyer.