The issue even if you have installed it in your node project (let's say using npm) then also you need to have the actual graphics processing binaries installed on your system!
brew install graphicsmagick
So, if it works locally for you make sure to install it on the prod server as well