Node.js在Windows 7上看不到ImageMagick [英] Node.js can't see ImageMagick on Windows 7

查看:83
本文介绍了Node.js在Windows 7上看不到ImageMagick的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了ImageMagick(ImageMagick-6.9.2-3-Q16-x64-static.exe)并添加了我的js文件,如下所示:

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

var easyimg     = require('easyimage');

但是当我启动node.js应用程序时,出现此错误:

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

找不到ImageMagick EasyImage需要ImageMagick才能工作.从 http://www.imagemagick.org/script/binary-releases.php <进行安装/a>.

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

推荐答案

确保ImageMagick目录位于您的路径中.将其添加到您的系统或用户PATH环境变量中.

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

最后一步应启动位于imagemagick路径中的查看器.

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

如果失败,请尝试从路径中删除除imagemagick以外的所有内容,以防您的编辑导致损坏的路径.

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

这篇关于Node.js在Windows 7上看不到ImageMagick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆