npm Guetzli not working

1k Views Asked by At

I am trying to do npm install guetzli. But always it is erroring saying

/Users/annah/Downloads/helloworldGoogle/node_modules/guetzli/vendor/guetzli` binary doesn't seem to work correctly  
⚠ guetzli pre-build test failed  
ℹ compiling from source   ✖ Error: mkdir -p

/Users/annah/Downloads/helloworldGoogle/node_modules/guetzli/vendor && make && mv bin/Release/guetzli

/Users/annah/Downloads/helloworldGoogle/node_modules/guetzli/vendor/guetzli Command failed: make && mv bin/Release/guetzli

/Users/annah/Downloads/helloworldGoogle/node_modules/guetzli/vendor/guetzli /bin/sh: pkg-config: command not found

in the command line. Done a lot of research. Nothing seems to help. Can you please share your ideas on this?

Thanks,

1

There are 1 best solutions below

0
On

Google does not maintain an NPM implementation of Guetzli, if all you need is a binary that will run on your computer, you can download a precompiled binary from here: https://github.com/google/guetzli/releases

The simplest way to get guetzli on a Mac is via Homebrew, simply:

brew install guetzli