funbox / optimizt

CLI image optimization tool
MIT License
923 stars 24 forks source link

Does it work on m1 macbooks? #30

Closed boringcoding closed 3 years ago

boringcoding commented 3 years ago

I'm getting npm ERR! Cannot find libjpeg or you have too old version (v6 or later required). But I have libjpeg installed via homebrew.

boringcoding commented 3 years ago

I managed to install it like this: CPPFLAGS="-I /opt/homebrew/Cellar/jpeg/9d/include" LDFLAGS="-L /opt/homebrew/Cellar/jpeg/9d/lib" npm i -g @funboxteam/optimizt

iamandrewluca commented 2 years ago

For me I had to replace in path 9d with 9e

343dev commented 2 years ago

Yes, it depends on the version of libjpeg you have installed.

brew info libjpeg

jpeg: stable 9e (bottled)
Image manipulation library
https://www.ijg.org/
/opt/homebrew/Cellar/jpeg/9e (21 files, 904.2KB) *
  Poured from bottle on 2022-03-02 at 00:56:01
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/jpeg.rb
License: IJG