image-diff icon indicating copy to clipboard operation
image-diff copied to clipboard

Not working on Windows 10

Open ghost opened this issue 9 years ago • 6 comments

Getting the following error:

C:\Users\paolo.delmundo\AppData\Roaming\nvm\v4.4.4\node_modules\image-diff\bin\image-diff:29
        throw err;
        ^

Error: Could not execute GraphicsMagick/ImageMagick: identify "-ping" "-format" "%wx%h" "run-first/login-2-after.png" this most likely means the gm/convert binaries can't be found
    at ChildProcess.<anonymous> (C:\Users\paolo.delmundo\AppData\Roaming\nvm\v4.4.4\node_modules\image-diff\node_modules\gm\lib\command.js:299:14)
    at emitOne (events.js:77:13)
    at ChildProcess.emit (events.js:169:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)

paolo.delmundo@WLREM1611473 MINGW64 ~/Code/discover/e2e/test-reports (discoverjs)
  1. I installed the ImageMagick Windows binaries.
  2. The installer included the path to the binaries.

ghost avatar Nov 03 '16 20:11 ghost

What happens when you run the command outside of image-diff?

identify -ping -format %wx%h run-first/login-2-after.png

twolfson avatar Nov 03 '16 21:11 twolfson

paolo.delmundo@WLREM1611473 MINGW64 ~/Code/discover/e2e/test-reports (discoverjs)
$ imagemagick identify -ping -format %wx%h run-first/login-2-after.png
bash: imagemagick: command not found

Prepending with imagemagic works:

paolo.delmundo@WLREM1611473 MINGW64 ~/Code/discover/e2e/test-reports (discoverjs)
$ magick identify -ping -format %wx%h run-first/login-2-after.png
1008x675

ghost avatar Nov 03 '16 21:11 ghost

That's peculiar; ImageMagick never has a prefix and GraphicsMagick typically uses gm as its prefix. Can you link us to where you installed ImageMagick from?

http://www.imagemagick.org/script/command-line-processing.php

http://www.graphicsmagick.org/convert.html

twolfson avatar Nov 03 '16 21:11 twolfson

http://www.imagemagick.org/script/binary-releases.php in the Windows binaries section

ghost avatar Nov 03 '16 21:11 ghost

Ah, interesting. After doing some research on the gm repo, this is due to name conflicts with some Windows executables.

https://github.com/aheckmann/gm/issues/559

It still isn't patched in gm so we can't upgrade to anything newer. For now, the workaround from that linked issue is to use "Install legacy utilities" during installation

twolfson avatar Nov 03 '16 21:11 twolfson

@mlmorg Can we add a new label named "blocked" with color #000000 and add it to this issue?

https://github.com/uber/image-diff/labels

twolfson avatar Nov 03 '16 21:11 twolfson