grunt-image 4 doesn't work on local machine
Closed, ResolvedPublic

Description

Starting with I0eaf94666a75feacbae2893a3cac2ab1e717a248 grunt-image doesn't work on my machine any more.
OOUI v0.24.0 was not affected by this error.

Options: optipng, pngquant, zopflipng, jpegRecompress=false, mozjpeg, guetzli=false, gifsicle, svgo, pngout, advpng, pngcrush
Warning: spawn /Users/…/htdocs/Wikimedia/oojs-ui/node_modules/pngquant-bin/vendor/pngquant ENOENT Use --force to continue.

npm v5.5.1
grunt-image 4.0.0
OS X

Tried removing node_modules, package-lock.json and reinstalling. Didn't solve the issue.

Volker_E created this task.Nov 7 2017, 10:45 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 7 2017, 10:45 PM
Volker_E closed this task as Invalid.Dec 14 2017, 8:05 AM

@Jdforrester-WMF Whatever it was, it must have been one of the following:

  • updating npm to v5.6.0
  • updating Homebrew to latest, v1.4.0
  • composer update
  • removing package-lock.json
  • removing node_modules
  • npm install

grunt image works now and svg2png works as well.

…aaaand grunt image doesn't work again. :(

spawn /Users/.../htdocs/Wikimedia/oojs-ui/node_modules/pngquant-bin/vendor/pngquant EAGAIN

Volker_E reopened this task as Open.Dec 20 2017, 11:15 PM

It doesn't work for me either, with a different error:

Warning: Command failed: F:\mediawiki\oojs\ui\node_modules\grunt-image\node_modules\zopflipng-bin\vendor\zopflipng.exe -y --lossy_8bit --lossy_transparent C:\Users\a\AppData\Local\Temp\fefdda57-44b5-4b6d-983f-c92b0efa20b7 C:\Users\a\AppData\Local\Temp\91b0bd99-a542-4a41-810f-aaf9f32967ac

Optimizing C:\Users\a\AppData\Local\Temp\fefdda57-44b5-4b6d-983f-c92b0efa20b7
Encoding error 82: color conversion to palette requested while a color isn't in palette
Decoding error 82: color conversion to palette requested while a color isn't in palette
There was an error

Can we just get rid of this library? We barely use the PNGs generated here in WMF production (only the checkbox I think, all normal icons go through ResourceLoaderImageModule instead).

Change 400269 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[oojs/ui@master] build: Stop using 'grunt-image' for optimizing PNGs

https://gerrit.wikimedia.org/r/400269

Change 400269 abandoned by Bartosz Dziewoński:
build: Stop using 'grunt-image' for optimizing PNGs

https://gerrit.wikimedia.org/r/400269

error 82 has come up again on my machine recently. I think we should follow @matmarex here.

Change 400269 restored by Jforrester:
build: Stop using 'grunt-image' for optimizing PNGs

https://gerrit.wikimedia.org/r/400269

Change 400269 merged by jenkins-bot:
[oojs/ui@master] build: Stop using 'grunt-image' for optimising PNGs, at least for now

https://gerrit.wikimedia.org/r/400269

Change 421083 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[oojs/ui@master] build: Replace grunt-image with grunt-imagemin

https://gerrit.wikimedia.org/r/421083

Jdforrester-WMF moved this task from Backlog to OOUI-0.26.1 on the OOUI board.Mar 23 2018, 11:15 PM
Jdforrester-WMF edited projects, added OOUI (OOUI-0.26.1); removed OOUI.

Change 421083 merged by jenkins-bot:
[oojs/ui@master] build: Replace grunt-image with grunt-imagemin

https://gerrit.wikimedia.org/r/421083

Volker_E closed this task as Resolved.Mar 23 2018, 11:31 PM
Volker_E triaged this task as Normal priority.
Volker_E assigned this task to Jdforrester-WMF.
Volker_E removed a project: Patch-For-Review.