pierreinglebert / node-zopfli

Node bindings for Zopfli Compression Algorithm (zlib, gzip, deflate compatible)
MIT License
110 stars 39 forks source link

node-zopfli package installs, but does not run #108

Closed faunaee closed 4 years ago

faunaee commented 4 years ago

This is on a MacbookPro:

$ node --version
v12.16.1
$ npm --version
6.13.4
$ uname -a
Darwin MacbookPro.local 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64

The install appears to be good:

$ npm i -g node-zopfli
/usr/local/bin/zopfli -> /usr/local/lib/node_modules/node-zopfli/bin/zopfli
/usr/local/bin/zopflipng -> /usr/local/lib/node_modules/node-zopfli/bin/zopflipng

> node-zopfli@2.1.3 install /usr/local/lib/node_modules/node-zopfli
> prebuild-install --runtime napi || prebuild-install || node-gyp rebuild

+ node-zopfli@2.1.3
added 65 packages from 105 contributors in 2.32s

However, when I try to run:

$ zopflipng test.png
/usr/local/lib/node_modules/node-pre-gyp/lib/util/versioning.js:220
        throw new Error(msg+"package.json must declare these properties: \n" + missing.join('\n'));
        ^

Error: node-zopfli package.json is not node-pre-gyp ready:
package.json must declare these properties: 
binary.module_name
binary.module_path
binary.host
    at Object.validate_config (/usr/local/lib/node_modules/node-pre-gyp/lib/util/versioning.js:220:15)
    at Object.exports.find (/usr/local/lib/node_modules/node-pre-gyp/lib/pre-binding.js:21:15)
    at Object.<anonymous> (/usr/local/lib/node_modules/node-zopfli/bin/zopflipng:9:27)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47
pierreinglebert commented 4 years ago

zopflipng was broken, it is fixed in the new v2.1.4