About Graphics Magick for node Error

走远了吗. 提交于 2019-12-11 17:41:15

问题


I run nodejs in windows and install gm with npm.

var readStream = fs.createReadStream(__dirname + '/../temp/a.jpg'); gm(readStream, 'a.jpg').write(__dirname + '/../temp/b.png', function (err) {if (err) console.log(err);});

Then I got the msg:

{ [Error: Command failed: CreateProcessW: ϵͳ�Ҳ���ָ�����ļ���] code: 127, signal: null }

Does gm support the windows or how could I deal with?


回答1:


Putting the GraphicsMagick installation directory in the PATH environment variable solved the problem for me.




回答2:


You need to first install GraphicsMagick (http://www.graphicsmagick.org/). Then:

npm install gm


来源:https://stackoverflow.com/questions/10098768/about-graphics-magick-for-node-error

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