at Socket.<anonymous> /node_modules/gm/lib/command.js:57:17)
Closed this issue ยท 9 comments
Env ๐
1. OS : OSX 10.11.6
2. Npm: 4.0.1
3. Node 6.2.1
Error ๐
[ Error: Stream yields empty buffer
at Socket.<anonymous> (/Users/hamma/test-img-console/node_modules/gm/lib/command.js:57:17)
at emitNone (events.js:91:20)
at Socket.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:926:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9),
Error: Could not execute GraphicsMagick/ImageMagick: gm "identify" "-ping" "-format" "%wx%h" "-" this most likely means the gm/convert binaries can't be found
at ChildProcess.<anonymous> (/Users/hamma/test-img-console/nodejs-plugins/console-img/node_modules/gm/lib/command.js:232:12)
at emitOne (events.js:96:13)
at ChildProcess.emit (events.js:188:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:202:12)
at onErrorNT (internal/child_process.js:348:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9) ]
Is it happening for all the images or for a specific image only? If it's the later, can you please upload the image?
Did you install the perquisite?
$ sudo apt-get install graphicsmagick # Ubuntu
$ brew install graphicsmagick # Mac OS X
Shouldn't the lwip
fallback prevent this?
@m59peacemaker It should the lwip
fallback should prevent the spawn error (ENOENT command not found ...
, or so). It's very hard to tell why does this problem appear at all, because we have no example when it fails like that.
The OP seems to have GraphicsMagick already installed.
Did it happen to you as well?
I did originally get the same error as the OP. I'm not sure whether I had graphicsmagick installed, but I thought I didn't and so went ahead installed it without checking first (oops). The same error remained. I just purged graphicsmagick and reinstalled image-to-ascii
globally, now the error is simply error spawn gm ENOENT
. I was just checking out the package. I don't have a stake in getting it working, but I hope my notes help.
@m59peacemaker Thanks for that! I will look into that error when getting a little bit of time. Sounds like lwip
is not used...
I reproduced this error on my machine. I'm on it.
@m59peacemaker @abdennour For my informationโdid you receive any errors during the installation?
You can double-check by running rm -rf node_mdoules && npm install
The installation should fail if lwip
fails to be installed.
Addressed in IonicaBizau/lwip2#16.
The reason for the error was: in case gm
is not available, lwip
is installed (and compiled). In case the required tools for compilation are missing (e.g. XCode or so), lwip
installation was failing silently. Now that error should block the image-to-ascii
installation. ๐ฅ