scionoftech / webp-converter

[DEPRECATED] A small node.js library for converting any image to webp file format or converting webp image to any image file format.
MIT License
229 stars 43 forks source link

Error: spawn /app/node_modules/webp-converter/lib/libwebp_linux/bin/cwebp ENOENT #10

Open gustavomc opened 6 years ago

gustavomc commented 6 years ago
Error: spawn /app/node_modules/webp-converter/lib/libwebp_linux/bin/cwebp ENOENT
kilohaty commented 6 years ago

https://github.com/kilohaty/webp-converter

srph-se commented 6 years ago

Do you have any answer for this issue? I have the same problem. I run my app on a Linux machine Thanks in advance!

kilohaty commented 6 years ago

@srph-se I modified the code like this, then it worked (win10 and centos) https://github.com/kilohaty/webp-converter/commit/a8ef2e4cfb44e660af8a2d553cae478898090fa3

the lib path is not correct.

gustavomc commented 6 years ago

hi @kilohaty i implemented your change now it throws just the code 101 without any description

kilohaty commented 6 years ago

@gustavomc are the parameters correct? and i modified the callback function, the first parameter is the status, the second parameter is the message

vincent-tr commented 4 years ago

On my side it fails with the same error message on an alpine-linux docker container, because the libc is different here than the libc used to compile the bundled one.

Is there any chance to get it bundled as well ?

larbisahli commented 3 years ago

@vincent-tr Did you find any solution? I am also getting the same error message on an alpine-linux docker container.

vincent-tr commented 3 years ago

Sadly no. I ended up using a container with another distribution (debian)

larbisahli commented 3 years ago

I manage to solve this for docker container with (debian) distribution by installing the following missing libraries.

In your Dockerfile

FROM bitnami/node

RUN apt-get update && apt-get install -y libglu1 && apt-get install -y libjpeg-dev

I am using https://github.com/imagemin/imagemin to convert jpeg to webp.

Hope it helps.

patkinson01 commented 11 months ago

@larbisahli and anyone wanting to run on Alpine, gcompat works:

FROM node:16-alpine RUN apk update \ && apk upgrade \ && apk add gcompat \

./node_modules/webp-converter/bin/libwebp_linux/bin/cwebp -version 1.1.0