imagemin / cwebp-bin

cwebp bin-wrapper that makes it seamlessly available as a local dependency

Home Page:https://developers.google.com/speed/webp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

postinstall should exit with non-zero state

pniederlag opened this issue · comments

cwebp-bin has some magic included that runs in postinstall. However we have seen, also postinstall is running into errors, our npm ci process will just continue. We believe this is due to the fact that postinstall command in cwebp-bin does return an exit status of 0 even when it detects and reports problems.

Testcommand:

node_modules/cwebp-bin$ npm run postinstall; echo $?

See output "0" in the last line in the following log:

node_modules/cwebp-bin$ npm run postinstall; echo $?

> cwebp-bin@5.0.0 postinstall /app/node_modules/cwebp-bin
> node lib/install.js

  ⚠ Command failed: /app/node_modules/cwebp-bin/vendor/cwebp -version
/app/node_modules/cwebp-bin/vendor/cwebp: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory


  ⚠ cwebp pre-build test failed
  ℹ compiling from source
  ✖ Error: Command failed: /bin/sh -c ./configure --disable-shared --prefix="/app/node_modules/cwebp-bin/vendor" --bindir="/app/node_modules/cwebp-bin/vendor"
configure: error: in `/tmp/1658b1d2-b733-4e2b-81b6-42a7c8912aa0':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking for style of include used by make... none
checking for gcc... no
checking for cc... no
checking for cl.exe... no

    at Promise.all.then.arr (/app/node_modules/execa/index.js:231:11)
    at process._tickCallback (internal/process/next_tick.js:68:7)
0