vvo / gifify

😻 Convert any video file to an optimized animated GIF.
ISC License
6.18k stars 313 forks source link

Neither dependency works on 2.4.0 #95

Open Beanow opened 7 years ago

Beanow commented 7 years ago

When installing giflossy it says:

Could not find gifsicle. Is it installed?

More info: https://github.com/vvo/gifify#requirements

When installing gifsicle it say:

gifsicle needs lossy

Using cli interface and global installs.

Beanow commented 7 years ago

As a workaround I used this in linux to fake the name.

sudo ln -s /usr/local/lib/node_modules/giflossy/cli.js /usr/local/bin/gifsicle
vvo commented 7 years ago

I have no idea of the issue.

Beanow commented 7 years ago

The problem is you're using spawn to detect the dependency. So if gifsicle is not an executable that has a --lossy param in it's usage string, it will give either error. Because npm install -g giflossy does not give you a gifsicle executable, but giflossy you can't use it as a drop-in replacement. You would need to detect which of the two is available.

vvo commented 7 years ago

I think we are fine asking for a non-npm installation of giflossy. Also I have high hopes lossy will be part of gifsicle, soon.

If you want to add that check, accepting PRs still

nicolas-raoul commented 5 years ago

Still no giflossy in Ubuntu 2019.04's gifsicle.

jtoy commented 4 years ago

just ran into same thing

Sawiq commented 4 years ago

Still no giflossy in Ubuntu 2019.04's gifsicle.

Same in Linux Mint 19.3 - gifsicle version 1.91, while current-one is 1.92. Maybe it is worth to ping debian package maintainer? nwm, debian buster has got version 1.92, so next iteration of debian-based distros will contain it by default.

The problem is you're using spawn to detect the dependency. So if gifsicle is not an executable that has a --lossy param in it's usage string, it will give either error. Because npm install -g giflossy does not give you a gifsicle executable, but giflossy you can't use it as a drop-in replacement. You would need to detect which of the two is available.

After installation of giflossy via npm globally I have got gifsicle soft link. If there is no gifsicle executable Beanow solution will work for sure.