ProtonMail / WebClients

Monorepo hosting the proton web clients
GNU General Public License v3.0
4.5k stars 568 forks source link

pngquant-bin install error #92

Closed babeuloula closed 6 years ago

babeuloula commented 6 years ago

Hello,

Describe the bug When I try to install with npm install I have an error and libpng-dev is installed :

> pngquant-bin@4.0.0 postinstall /home/ubuntu/ProtonMail/WebClient/node_modules/imagemin-pngquant/node_modules/pngquant-bin
> node lib/install.js

  ⚠ The `/home/ubuntu/ProtonMail/WebClient/node_modules/imagemin-pngquant/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
  ⚠ pngquant pre-build test failed
  ℹ compiling from source
  ✔ pngquant pre-build test passed successfully
  ✖ Error: pngquant failed to build, make sure that libpng-dev is installed
    at Promise.all.then.arr (/home/ubuntu/ProtonMail/WebClient/node_modules/imagemin-pngquant/node_modules/bin-build/node_modules/execa/index.js:231:11)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
npm WARN eslint-config-airbnb-base@13.0.0 requires a peer of eslint@^4.19.1 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-vue@3.14.0 requires a peer of eslint@^3.18.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN inquirer-autocomplete-prompt@1.0.1 requires a peer of inquirer@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pngquant-bin@4.0.0 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pngquant-bin@4.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

The log file :

1504 verbose stack Error: pngquant-bin@4.0.0 postinstall: `node lib/install.js`
1504 verbose stack Exit status 1
1504 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
1504 verbose stack     at emitTwo (events.js:126:13)
1504 verbose stack     at EventEmitter.emit (events.js:214:7)
1504 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
1504 verbose stack     at emitTwo (events.js:126:13)
1504 verbose stack     at ChildProcess.emit (events.js:214:7)
1504 verbose stack     at maybeClose (internal/child_process.js:925:16)
1504 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
1505 verbose pkgid pngquant-bin@4.0.0
1506 verbose cwd /home/ubuntu/ProtonMail/WebClient
1507 verbose Linux 4.15.0-29-generic
1508 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
1509 verbose node v8.11.3
1510 verbose npm  v6.2.0
1511 error code ELIFECYCLE
1512 error errno 1
1513 error pngquant-bin@4.0.0 postinstall: `node lib/install.js`
1513 error Exit status 1
1514 error Failed at the pngquant-bin@4.0.0 postinstall script.
1514 error This is probably not a problem with npm. There is likely additional logging output above.
1515 verbose exit [ 1, true ]

Desktop (please complete the following information):

Can you tell me why I can't install the webclient ?

Thanks

dhoko commented 6 years ago

:wave: Which version of node/npm do you have ? I had the same issue with docker, fixed it with this lib https://github.com/imagemin/mozjpeg-bin/issues/18#issuecomment-273973388 Maybe there is a better patch but didn't try to find a better fix yet.

babeuloula commented 6 years ago

This is node 8.11.3

And I just need to download the deb file and install it ?

dhoko commented 6 years ago

Yup, it should be enough. (It is for my container)

babeuloula commented 6 years ago

Indeed, it's works very fine with this deb file : http://ppa.launchpad.net/hiberis/ppa/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.27-1ubuntu1%7Eppa1_amd64.deb

Thanks you