Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-zopfli package install, but does not run #114

Open
faunaee opened this issue Sep 16, 2020 · 1 comment
Open

node-zopfli package install, but does not run #114

faunaee opened this issue Sep 16, 2020 · 1 comment

Comments

@faunaee
Copy link

faunaee commented Sep 16, 2020

This is on a MacBook Pro:

$ 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/zopflipng -> /usr/local/lib/node_modules/node-zopfli/bin/zopflipng
/usr/local/bin/zopfli -> /usr/local/lib/node_modules/node-zopfli/bin/zopfli

> [email protected] install /usr/local/lib/node_modules/node-zopfli
> prebuild-install --runtime napi || prebuild-install || node-gyp rebuild

+ [email protected]
updated 2 packages in 4.968s
$ zopflipng --version
2.1.4

However, when I try to run:

$ zopflipng test.png test-zopfli.png
/usr/local/lib/node_modules/node-zopfli/bin/zopflipng:49
  zopfli.pngcompress(program.args[0], program.args[1], options);
         ^

TypeError: undefined is not a function
    at Object.<anonymous> (/usr/local/lib/node_modules/node-zopfli/bin/zopflipng:49:10)
    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
@faunaee
Copy link
Author

faunaee commented Sep 22, 2020

I get the same error on an Ubuntu box:

$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 20.0.4.1 LTS
Release:        20.04
Codename:       focal
$ node --version
v10.19.0
$ npm --version
6.14.4
$ uname -a
Linux desktop 5.4.0-31-generic #35-Ubuntu SMP Thu May 7 20:20:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant