How do I fix this error with node.js and node-imagemagick: Error: Command failed: execvp(): Permission denied?
Im getting this error:
Error: Command failed: execvp(): Permission denied
When I do a simple node-imagemagick script:
im = require('imagemagick');
im.identify.path = '/tmp/node_thumbs/';
im.identify('cool.jpg',function(err,features){
if(err) throw err;
cons开发者_Python百科ole.log(features);
});
Any ideas on what could be causing this?
The permission denied is from trying to launch the ImageMagick command, not in the process of executing it.
If you look at the documentation, identify.path is "Path to the identify program." In this case, you're redefining the path to the executable as /tmp/node_thumbs/, which presumably is not the executable.
You probably simply want:
var im = require("imagemagick");
im.identify('/tmp/node_thumbs/cool.jpg',function...
精彩评论