Node.js can't see ImageMagick on Windows 7

百般思念 提交于 2020-01-03 12:59:31

问题


I Installed ImageMagick (ImageMagick-6.9.2-3-Q16-x64-static.exe) and add in my js file following:

var easyimg     = require('easyimage');

but when I start my node.js app I get this error:

ImageMagick Not Found EasyImage requires ImageMagick to work. Install it from http://www.imagemagick.org/script/binary-releases.php.


回答1:


Make sure the ImageMagick directory is in your path. Add it to your system or user PATH environment variable.

Test by opening a new command window and running the following:

cd C:\PATH\TO\NODE_PROJECT\
echo %PATH%
imdisplay.exe

The last step should launch a viewer which is in the imagemagick path.

If you set and verifed the path is correct then you should not get any error when your run:

node app.js

If that fails try removing everything except imagemagick from your path in case your edits have resulted in a corrupt path.

set PATH=C:\PATH\TO\IMAGEMAGICK
C:\PATH\TO\NODE\node.exe app.js



回答2:


In windows, rename file 'magick.exe' to 'convert.exe' will work.




回答3:


When you install ImageMagick, check the option Install legacy utilities (e.g. convert).



来源:https://stackoverflow.com/questions/32781975/node-js-cant-see-imagemagick-on-windows-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!