CF error: "the gm/convert binaries can't be found"
See original GitHub issueVersion info
firebase-functions: 2.0.5
firebase-tools: 4.2.1
firebase-admin: 6.0.0
Test case
I use Imagick to scale images and to check their dimensions. Everything worked okay until yesterday, when CF started throwing errors when running Imagick commands using the npm module gm
.
Steps to reproduce
Use Imagick in code. The code deploys successfully. But after some deploys the imagick cannot be used, and after some deploys, it can be.
const im = gm.subClass({ imageMagick: true });
// ...
im(tmpFilePath).identify('%w', (err, result) => {
// ...
})
// ...
im(tmpFilePath).scale(size, 0).write(targetFileName, err => {
// ...
})
// ...
Were you able to successfully deploy your functions?
Yes. No errors during deploy.
Expected behavior
Imagick binary is available. NPM module gm
can be used. Just like two days ago.
Actual behavior
Using gm
the following error occurs
Error: Could not execute GraphicsMagick/ImageMagick: identify "-ping" "-format" "%w" "/tmp/photo_1540550839532" this most likely means the gm/convert binaries can't be found
at ChildProcess.<anonymous> (/srv/node_modules/gm/lib/command.js:232:12)
at emitOne (events.js:116:13)
at ChildProcess.emit (events.js:211:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:196:12)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
Sometimes, after redeploy (with no change to the code whatsoever) it works, until there is a new deploy that brakes it. There is no way to tell if the deploy will have this problem without actually running the code.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
The gm/convert binaries can't be found · Issue #455 - GitHub
I am running Nodejs v4.1.1 in Windows 10 (64-bit). When I execute the following code: var gm = require('gm').subClass({imageMagick: true});.
Read more >gm conversion issue in node.js - Stack Overflow
1. I got an error because I thought graphicsmagic will automatically download imagemagick also, but it's not. After seen your answer I installed ......
Read more >Graphics Magick Version - Node - Alibaba Cloud
What ImageMagick binary version is installed and running (e.g. magick ... this most likely means the gm/convert binaries can\'t be found.
Read more >Is there a way to convert webp to jpg using CF?
I provided simple command line examples to convert WEBP to JPG using both GraphicsMagick and ImageMagick. Install either. After a file with the ......
Read more >Untitled
Feuerwehr vierzehnheiligen, Rza you can't stop me now lyrics. Daniel nacucchio y cristina sosa 2014, How to grow pineapple from top, Wcml tv,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @Jbz797 I did find the errors in my case. I opened two new issues that may help you.
Import gm with ES6 Use .webp
If you are using typescript as I was, the first issue is the one to follow. And the current solution is to import gm with
require
. You don’t getTypes
but it works.Hope it helps! 😉
Hi I’m running into the same issue. I’ve updated everything and theres now way I can solve the problem.
My dependencies:
The error:
In local works perfectly. Thanks